MU-VMS Archives

May 1995

MU-VMS@LISTSERV.MIAMIOH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Kent Covert <[log in to unmask]>
Reply To:
Miami University VMS Discussion <[log in to unmask]>
Date:
Tue, 16 May 1995 07:34:07 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (50 lines)
In article <1995May15.110054.45307@miavx1>, [log in to unmask]
(Brian J. Bernstein) writes:
>   I have a program that I wrote in C that needs 2-3 parameters. When I run
it, I get a
> %DCL-TOOMANYPARAMETERS kind of error. How do I fix this? Thanks
 
This is a common question/problem on VMS and one that is fixed/changed in
the next version of the OS.  I'm going to assume that you tried something
like this:
 
    $ RUN PROG1 PARAM1 PARAM2 PARAM3
 
The RUN command only takes 1 parameter - the name of the program to run.
To run a program that takes parameters, you must first set it up as a
"foreign command".  For example, add the following line to your login.com
file:
 
    $ PROG1 == "$SYS$LOGIN:PROG1.EXE"
 
Then, you can use the command:
 
    $ PROG1 PARAM1 PARAM2 PARAM3
 
to run your program.
 
A couple of things to remember: 1) Don't forget the initial $ in the
definition of the PROG1 "command" and 2) Make sure you give a path to the
command (if you don't, the system looks in the directory SYS$SYSTEM for the
program).
 
You can also run the program "on the fly" without creating the foreign
command first by using the MCR command.  For example,
    $ MCR SYS$LOGIN:PROG1.EXE PARAM1 PARAM2 PARAM3
Again, though, you must give a complete path to the program or the system
will assume that the program is located in SYS$SYSTEM.
 
OpenVMS 6.2 (due out this month) is supposed to change the way this works.
I don't have all of the details yet, but these foreign commands aren't
supposed to be needed anymore.  From what I understand, OpenVMS 6.2 will
have a PATH variable (similar to DOS and Unix) and will search that path
for programs to execute.  MCIS will be evaluating OpenVMS 6.2 over the
summer to determine when/if to install it on the system.
 
--
                                     Kent Covert, Software Coordinator
                                     Miami Computing and Information Services
                                     Miami University, Oxford, OH
                                     [log in to unmask]  (internet)
                                     kacovert@miavx1                 (bitnet)

ATOM RSS1 RSS2