I'd like to run a program from an ESP REXX exec.

Document ID : KB000053946
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

I'd like to run a program from an ESP REXX exec.

Solution:

The REXX commands LINKMVS and ATTCHMVS can be used as per the IBM manual. For example

ADDRESS ATTCHMVS 'TESTPGMA var1 var2 var3'
The above will run program TESTPGMA and pass parameters var1, var2 and var3.
These 2 commands will get the programs from the LINKLIST or the STEPLIB/JOBLIB.
Note that it comes from the ESP STEPLIB/JOBLIB and the library must be APF authorized.