IUBio

Wildcards in DCL?

Hugh Salter hugh at molbiol.ox.ac.uk
Mon Nov 4 08:06:09 EST 1996


In article <55d2jn$3l0 at krypto.zippo.com>, mcoyne at argo.net (Michael Coyne) writes:
> Hello -
> 
> I've wriiten a command file for OpenVMS which simply takes the two
> steps needed to change a flat ASCII text file into a GCG file and
> makes it a single step by linking chopup and reformat.
> 
> I'd like to add wildcard capabilities to this com file, so that one
> could, for example, issue the command:
> 
> chopgcg *.txt
> 
> and have chopgcg (the name of the com file I've written) act on all
> files in the directory with the .txt extension.
> 
> Is there a general way of doing this, some kind of loop, or a
> statement similar in function to the DOS command FOR (xx) IN (xx) DO
> (xx)?
> 
 
Yes, there is a way of doing this; you loop the filespec through
F$SEARCH; on each pass a pointer is updated (and you can also have
multiple streams) such that F$SEARCH returns the next file in the
wildcard. I used to do this sort of thing... However, if I were you,
I would rewrite it in perl! I have had few problems with VMS perl of
5.002 or higher - perl is how we solve this particular problem.
The perl script can call GCG programs if necessary.

Hugh

-----------------------------------------------------------------------------
Dr Hugh Salter                Oxford University Molecular Biology Data Centre
hugh at molbiol.ox.ac.uk                     Tel: (01865) 2-75507 
    "Even if you're not paranoid, they're probably out to get you anyway"
-----------------------------------------------------------------------------





More information about the Info-gcg mailing list

Send comments to us at biosci-help [At] net.bio.net