Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!cbatt!cbosgd!ukma!psuvm.bitnet!qaa From: QAA@PSUVM.BITNET Newsgroups: net.decus,net.unix,net.usenix Subject: Re: Favorite operating systems query (UNIX vs VMS flaming!!!) Message-ID: <6424QAA@PSUVM> Date: Wed, 9-Jul-86 14:11:31 EDT Article-I.D.: PSUVM.6424QAA Posted: Wed Jul 9 14:11:31 1986 Date-Received: Fri, 11-Jul-86 05:36:33 EDT References: <486@batcomputer.TN.CORNELL.EDU> <1000@ttrdc.UUCP> <873@rti-sel.UUCP> 1320@psivax.UUCP Lines: 55 Xref: watmath net.decus:392 net.unix:8565 net.usenix:641 > > 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@Psuarch