I went at it systematically:

 
+----------------------------------------+----------------------------------
-----------------------+
  + address LINKMVS '<program>','<parm>'   | Error running <exec>, line
<nn>: Unexpected "," or ")"  |
 
+----------------------------------------+----------------------------------
-----------------------+
  + address LINKMVS '<program>,<parm>'     | RC -3 (routine not found)
|
 
+----------------------------------------+----------------------------------
-----------------------+
  + address LINKMVS '<program> <parm>'     | RC -2 (I don't see this
documented), no program output  |
  + address LINKMVS '<program>' '<parm>'   |
|
 
+----------------------------------------+----------------------------------
-----------------------+

Then I tried it your way, assigning the parm string to PARM and running
this:

 
+----------------------------------------+----------------------------------
-----------------------+
  + address LINKMVS '<program> PARM'       | That's what I wanted.
|
 
+----------------------------------------+----------------------------------
-----------------------+

Thanks, Shmuel.

---
Bob Bridges, [email protected], cell 336 382-7313

/* I find that when someone's taking time to do something right in the
present, he's a perfectionist with no ability to prioritize, whereas when
someone took time to do something right in the past, he's a master artisan
of great foresight.  -xkcd */

-----Original Message-----
From: IBM Mainframe Discussion List <[email protected]> On Behalf Of
Seymour J Metz
Sent: Friday, April 30, 2021 15:02

You need the LINKMVS or ATTCHMVS environment. The syntax is

     ADDRESS environment command

The first word of the command is the program name. Subsequent words are the
names of parameter. Example:

     foo = MYPROGRAM
     bar = MYPARM MYDDNAMES
     myparm = 'TRACE=NO'
     myddnames = 'ALTPRINTALTIN'
     ADDRESS LINKMVS FOO BAR

If novalue is enabled then you will need quotes (' or ") in the first two
statements.

________________________________________
From: IBM Mainframe Discussion List [[email protected]] on behalf of
Bob Bridges [[email protected]]
Sent: Friday, April 30, 2021 2:34 PM

I know I've done this before, but I'm having trouble doing something that
most of you will say should be simple.  I have some JCL that executes a
program in batch, and I want to create a REXX that does it in the foreground
- allocates the datasets, runs the program, then fetches the output and
displays it in View.  The program requires something in the PARM, and I'm
having trouble remembering the syntax for that.  Here's what I've tried:

 
+-----------------------------------+---------------------------------------
---------------------+
  + call '<program>,<parm>'           | Error running <exec>, line <nn>:
Routine not found         |
 
+-----------------------------------+---------------------------------------
---------------------+
  + address LINK '<program>,<parm>'   | RC -3 (routine not found)
|
 
+-----------------------------------+---------------------------------------
---------------------+
  + '<program>','<parm>'              | Error running <exec>, line <nn>:
Unexpected "," or ")"     |
  + address LINK '<program>','<parm>' |
|
 
+-----------------------------------+---------------------------------------
---------------------+
  + call '<program> <parm>'           | Error running <exec>, line <nn>:
Incorrect call to routine |
  + call '<program>' '<parm>'         |
|
  + call '<program>','<parm>'         |
|
 
+-----------------------------------+---------------------------------------
---------------------+
  + '<program> <parm>'                | Program returns RC and complains it
can't see the PARM.    |
  + '<program>,<parm>'                |
|
  + '<program>' '<parm>'              |
|
  + address LINK '<program> <parm>'   |
|
  + address LINK '<program>' '<parm>' |
|
 
+-----------------------------------+---------------------------------------
---------------------+

Unless I go to LINKMVS or LINKPGM (and I don't know what those are for), I
think I've used up all the possible combinations.  What am I missing?

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to