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.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3

________________________________________
From: IBM Mainframe Discussion List [[email protected]] on behalf of Bob 
Bridges [[email protected]]
Sent: Friday, April 30, 2021 2:34 PM
To: [email protected]
Subject: Syntax for calling a program from REXX with parm

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?

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

/* You do not examine legislation in the light of the benefits it will convey 
if properly administered, but in the light of the wrongs it would do and the 
harms it would cause if improperly administered.  -Lyndon Johnson */

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

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

Reply via email to