Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!boulder!ccncsu!ncr-fc!dona From: dona@ncr-fc.FtCollins.NCR.com (Don Allingham) Newsgroups: comp.lang.c Subject: Re: Command line parameters with VAX C? Message-ID: Date: 2 Jan 90 21:20:55 GMT References: <6808@lindy.Stanford.EDU> Sender: news@ncr-fc.FtCollins.NCR.COM Organization: NCR Microelectronics, Ft. Collins, CO Lines: 45 In-reply-to: LC.YRS@forsythe.stanford.edu's message of 2 Jan 90 18:56:18 GMT On 2 Jan 90 18:56:18 GMT, LC.YRS@forsythe.stanford.edu (Richard Stanton) said: Richard> Using C on my PC, I can pass command line parameters to programs via Richard> the simple: Richard> progname [parameter list] Richard> On a VAX, I type cc [progname] to compile, link [progname...] to Richard> link, and "run progname" to run a program. How do I pass command Richard> line parameters (file names etc) to a program under this system? If Richard> I type Richard> run progname parmlist Richard> I get a message complaining that RUN is being given too many Richard> parameters. HELP RUN is not too informative. Richard> Thanks Richard> Richard Stanton Richard> pstanton@gsb-what.stanford.edu VMS does things a little different than the UNIX/PC world. Basically, you need to define a symbol. For the program foo.exe, you would have to do: foo :== $disk:[directory]foo.exe The $ is required. disk is the disk name, directory is the VMS directory path. Command line arguments will now be understood. Note that in VMSland, this definition lasts only for the current login session, so you would want to put the definition in your login.com file, or have your system administrator enter it in one of the start up files. (No, I am not a VMS guru. VMS is a necessary evil in my UNIX world.) -- Don Allingham NCR Microelectronics ncr-fc!bach!dona@ccncsu.colostate.edu Ft. Collins, CO. ...!ncr-sd!ncr-fc!bach!dona