jim.dillon@sentry.com Beginner
Joined: 28 Aug 2020 Posts: 9 Topics: 4
|
Posted: Tue Sep 01, 2020 11:59 am Post subject: Passing Symbolic Parameters to an EXEC in batch |
|
|
I have the following JCL:
Code: |
000006 // SET LPAR=ARES * This is for ARES data sets
000007 // SET BDATE=D200828 * Current date for backups
000008 //*
000009 //BKUP PROC LPAR=LPAR,BDATE=BDATE
000010 //*
000011 //PSTEP12 EXEC PGM=IKJEFT01,DYNAMNBR=99,REGION=0M,
000012 // PARM='%RKBKUP &LPAR'
- - - - - - - - - - - - - - - - - - - - - 31 Line(s) not Displayed
000044 //SYSTSPRT DD SYSOUT=*
000045 //SYSTSIN DD DUMMY
000046 //SYSOUT DD SYSOUT=*
000047 //*
- - - - - - - - - - - - - - - - - - - - - - 7 Line(s) not Displayed
000055 // PEND
000056 //*
000057 //JSTEP01 EXEC BKUP LPAR=&LPAR,BDATE=&BDATE
|
I want to be able to use EXEC RKBKUP for multiple jobs, passing the symbolic parameter 'LPAR' to the exec. The parameter is first set in a SET statement in line 6, passed to the instream procedure in step JSTEP01 on line 57 and then passed to the EXEC in PROC step PSTEP12 as an argument to the EXEC on line 12.
In my REXX exec I have the statement 'PULL ARG' but the parameter is not being passed I think because it is included in the PARM statement which is enclosed in quotes. I can also execute the EXEC in the SYSTSIN statement but I think I'd run into the same issue where the parameter is not replaced.
Is this possible to do?
Jim |
|