Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!ames!ucbcad!ucbvax!TAMCHEM.BITNET!BMW6957 From: BMW6957@TAMCHEM.BITNET.UUCP Newsgroups: comp.os.vms Subject: re:Getting a command line in DCL Message-ID: <8704281214.AA17747@ucbvax.Berkeley.EDU> Date: Mon, 27-Apr-87 12:37:00 EDT Article-I.D.: ucbvax.8704281214.AA17747 Posted: Mon Apr 27 12:37:00 1987 Date-Received: Wed, 29-Apr-87 06:34:01 EDT Sender: daemon@ucbvax.BERKELEY.EDU Distribution: world Organization: The ARPA Internet Lines: 28 > I've looked all over the place and cannot figure a way to do this... >Is there a way pas everything after the call to a DCL command procedure >(i.e. @something) as a string to the procedure? I can use 'P1 thru 'Pn, >but I would like to be able to use something like f$element() to get >values in a loop. On the other side, is there any way to make something >like 'P{n} (in Metafile) where it will become one symbol with {n} replaced >by whatever n happens to be? To pass the entire command line to a DCL procedure, you can define the command like so: $ COMMAND=="@DCLPROC """ Which will provide an initial quote to anything following COMMAND on the line; DCL will provide the closing quote. The entire command line (after the COMMAND token) will then be placed in P1 (along with a leading space). This will NOT work if you intend to pass quoted strings to the procedure! To get at P{n} from within the procedure, what's wrong with the construction: $ A=P'N which will set the symbol A to the value contained in P{n}. Brad Wilson BMW6957@TAMCHEM.BITNET