Subject: | |
From: | |
Reply To: | |
Date: | Thu, 16 Feb 1995 15:25:00 -0800 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Thomas Hagen ([log in to unmask]) wrote (2/15):
> Hello, I want to pass parameters to a cobol program i'm working on.
> The program should be executed by typing it's name followed by a
> parameter fx. :
> MYPROG PARM1
[..By now, several may have already replied, so this may be old....]
The JOBINFO intrinsic, item #11 will return to the program the
last job step, which essentially would be the execution line. Please
refer to the Intrinsics Manual.
While not specified, there is also a technique to get at this info
within a command file. Little-known is the use of the explanation point
character ("!") in MPE/iX. Basically it is another indication for a
user's position in the redo stack. So a reference of "!-1" essentially
references the previous command:
SHOWTIME
<time>
ECHO !-1 -or- SETVAR cmd "!-1"
<SHOWTIME> ECHO !cmd
Given this, one could obtain the command line issued by the user which
invokes the command file and then use this information within the command
file itself. There is a paper in the 1993 Interex Conference Proceedings
(paper 5002 by Jack Bailie), which offers a number of ideas/techniques
which uses this in command files.
-- Jerry
|
|
|