MARKUS@LOYVAX.BITNET (04/13/88)
>> From: Mike Temkin <sdcrdcf!csun!mst@hplabs.hp.com> >> Subject: VMS global symbols >> >> I have a few programs that need command line parameters passed to them. >> The documentation that comes with them (not much there) shows that a global >> symbol ( :== ) should be used. I have tried to get them to work, but >> I see no difference between typing 'RUN PROGRAM' and setting a global >> symbol like 'PRG :== RUN PROGRAM 'P1 'P2' then typing 'PRG param1 param2'. >> >> Can anyone tell me what I am doing wrong? >> >> Thanks in advance, >> Mike Temkin Instead of this: PRG :== RUN PROGRAM P1 P2 try this: PRG :== $ disk:[directory]PROGRAM and then this at the command line PRG param1 param2 I'm not sure what the difference between $ and RUN, but you need the $ if you want to pass parameters. You also need to have it in a symbol; typing it at directly on the command line just won't work. You also need the disk and directory, or it'll look in SYS$SYSTEM cos it thinks it's a command. The only place i saw it documented was in the C manual where ARGC and ARGV are described. There it said to look in the DCL Dictionary under installing foreign commands, but i didn't see anything about foreign commands. If anyone can tell me where this is well documented, or how it fits into the scheme of things, i'd appreciate it. Hope what i have helps... markus plummer MARKUS@LOYVAX.BITNET loyola college (baltimore) acs
stian@csvax.liv.ac.uk (04/22/88)
In article <8804180146.AA03807@ucbvax.Berkeley.EDU>, MARKUS@LOYVAX.BITNET writes: > I'm not sure what the difference between $ and RUN, but you need the $ if you > want to pass parameters. I'm by no means an expert, but as I understand it, when you use RUN, the command line (parameters and qualifiers) gets passed to the RUN image, so the only parameter allowed will be the program that is to be RUN, and the only qualifiers allowed are those which can (and will) be used by RUN. If, however, you use 'prg :== $prg' then the command line will be passed directly to _your_ image (prg), and you can then do as you like with it. Ian Finch +----------------------------+----------------------------------------------+ | Dept. of Computer Science, | uucp: ...!ukc!mupsy!liv-cs!stian | | University of Liverpool, | arpa: stian%csvax.liv.ac.uk@nss.cs.ucl.ac.uk | | P.O. Box 147 | Janet: stian@uk.ac.liv.csvax | | Liverpool | | | L69 3BX | | +----------------------------+----------------------------------------------+