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

Daniel R. Levy levy at ttrdc.UUCP
Thu Jul 10 10:09:30 AEST 1986


In article <1320 at psivax.UUCP>, 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)!
>                                Sarima (Stanley Friesen)
>UUCP: {ttidca|ihnp4|sdcrdcf|quad1|nrcvax|bellcore|logico}!psivax!friesen
>ARPA: ??

To be fair, it is possible to set a user program up to receive command line
arguments which have been pre-parsed by DCL, but the procedure is indeed
slightly "messy" (special library functions must be called from the user
program, and DCL must be told explicitly (as in the login procedure) about
a file containing a description of how DCL is to parse the arguments,
qualifiers, etc. for user commands.  (It is also possible to set up a
user program as a "foreign" command, whereby it is defined as a "symbol"
[kind of like a ksh or csh "alias"] and an image of the command line can
be accessed through a special library function by the program thus invoked.)

However, even at best DCL "diagnostics" can be ambiguous.  For example,

$ SHOW USERS/BOGUS

gets me the diagnostic

%DCL-W-IVQUAL, unrecognized qualifier - check validity, spelling, and placement
 \BOGUS\

Hardly pointing out the specific problem!  Better something like this (under
System V):

$ who -bogus
who:  illegal option -- o
Usage:	who [-rbtpludAasHTq] [am i] [utmp_like_file]

r	run level
b	boot time
t	time changes
p	processes other than getty or users
l	login processes
u	useful information
d	dead processes
A	accounting information
a	all (rbtpludA options)
s	short form of who (no time since last output or pid)
H	print header
T	status of tty (+ writable, - not writable, x exclusive open, ? hung)
q	quick who
-- 
 -------------------------------    Disclaimer:  The views contained herein are
|       dan levy | yvel nad      |  my own and are not at all those of my em-
|         an engihacker @        |  ployer or the administrator of any computer
| at&t computer systems division |  upon which I may hack.
|        skokie, illinois        |
 --------------------------------   Path: ..!{akgua,homxb,ihnp4,ltuxa,mvuxa,
						vax135}!ttrdc!ttrda!levy



More information about the Comp.org.usenix mailing list