Favorite operating systems query (UNIX vs VMS flaming!!!)

QAA at PSUVM.BITNET QAA at PSUVM.BITNET
Thu Jul 10 04:11:31 AEST 1986


>
>        Oh, *great*:-) How does the DCL parse the arguments for a user
>written application program?? I can't see how it can do this without
>some rather messy interface requirements.  This really sounds like a
>way to make user-written programs second class citizens on the system.
>I think the individual program is better qualified to analyse its own
>arguments, whay is really needed is a *standard* for this, like getopts(3)!
>--
>
>                                Sarima (Stanley Friesen)
>
>UUCP: {ttidca|ihnp4|sdcrdcf|quad1|nrcvax|bellcore|logico}!psivax!friesen
>ARPA: ??
     
VMS allows *TWO* ways for an image (with parameters) to be activated.
If you so choose, you may have your application parse ALL of the
command line, spending tons of worthless cpu time deciding what is
right and what is wrong, or you can opt to have DCL parse the command
line for you.  In EITHER case, it is YOUR decision as to which
parameters or qualifiers are valid, etc.
     
In the first case, your program would make a call to a library
function called LIB$GET_FOREIGN(...)  and magically you would be
given everything typed past the command name.  From that point
on, it's your responsibility to parse the mess you get.
     
The other alternative is to write a "command definition" file
which describes EXACTLY to DCL what qualifiers or parameters
are valid, which ones can be use together, which ones require
a value, which ones have default values, etc..  Sounds pretty
powerful to me!  DCL will even PROMPT for missing parameters
with a prompt that YOU decide on!
     
All your program has to do then is to call special routines
to pick up this information.  For example, to get the value
of the qualifier "/REMOTE" all you would do is call a routine
called CLI$GET_VALUE('REMOTE'...)  Magically you get a string
returned which contains the "value" of the qualifier.
     
I don't see this interface as kludgy in any way, I consider
it an elegant interface to a complex parsing routine called
DCL.   For more on how this all works, check out the Command
Definition Utility in the Utilities Ref. Manual.  (You might
be surprised)
     
Ever considered checking the manuals BEFORE complaining about
this or that?
     
Cheers,
     
Tim Bieling, System Manager - Architecture Computer Lab
                              Penn State University
     
Bitnet:  Bieling at Psuarch
     



More information about the Comp.org.usenix mailing list