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

g-rh at cca.UUCP g-rh at cca.UUCP
Wed Jul 9 16:28:09 AEST 1986


In article <> friesen at psivax.UUCP (Stanley Friesen) writes:
>In article <873 at rti-sel.UUCP> rcb at rti-sel.UUCP (Random) writes:
>>
>>>Most Unix programs will print out a line or so of "usage" diagnostics if you
>>>invoke them with bogus arguments.  Do VMS programs do this?
>>>
>>
>>No. VMS programs will not let you invoke them with bogus arguments. Since
>>the arguments are parsed by DCL before the program is invoked, if you give
>>too many parameters or an unknown switch DCL will reject it with an error
>>message that points out the specific problem.
>
>	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)!

	I'm not a VMS guru but I know enough to know that this is all
getting a little confused.  VMS programs which are not installed can
be executed either with RUN or MCR.  RUN is a general utility for
executing a user application program; MCR is another such utility with
somewhat different rules.  In particular, arguments cannot be passed
to programs invoked using RUN; however they can for programs invoked
using MCR.  System programs take options in the form of switches.  Thus:

run xyz
mcr xyz arg1 arg2 arg3
dir/col=1

[DIR is the equivalent of ls.  The slash signifies a switch (option).
In this case the output is one column per line.]

I don't know the rules for creating commands using switches.  (My
impression is that is done as part of installation -- but I just don't
know.)  In any case the DCL switch parser is the equivalent for VMS
of getopts for publicly known programs.  The difference is that you
have to describe to the system what rules your options (switches)
follow if your program is a public program.  When your program is
invoked the DCL validates the arguments before the program is brought
up.  DISCLAIMER -- this is just my impression; someone with VMS systems
experience should clarify the matter.  However, if my understanding is
correct, then this is a perfectly reasonable way to do things  -- I
would count it as preferable since it insists that options in public
(system wide) utilities be handled in a standardized manner.

		Richard Harter SMDS Inc.



More information about the Comp.org.usenix mailing list