P.S.
SET variables can be assigned their values before // EXEC PROC=, and their values used inside those PROCs, unless the PROC is using its own parameters with the same names.
Using Symbolic parm in PROC's SYSTSIN
- sergeyken
- Posts: 458
- Joined: Wed Jul 24, 2019 10:12 pm
- Skillset: Assembler, JCL, Utilities, PL/I, C/C++, DB2, SQL, REXX, COBOL, etc. etc. etc.
- Referer: Internet search
Re: Using Symbolic parm in PROC's SYSTSIN
Javas and Pythons come and go, but JCL and SORT stay forever.
-
- Posts: 474
- Joined: Thu Mar 10, 2016 5:03 pm
- Skillset: assembler rexx zOS ispf racf smf
- Referer: saw it in the experts foprum thought I could help here
Re: Using Symbolic parm in PROC's SYSTSIN
Maybe try a diffferent approach, using 1 extra step to convert the parm to lines. Then you can do away with all those SETs and EXPORTs.
Note that this is a very quick and dirty solution so can definitely be improved.
1. REXX parm splitter
2. demo proc
Note that this is a very quick and dirty solution so can definitely be improved.
1. REXX parm splitter
Code: Select all
/* rexx */
parse arg prm /* i.e. 'DSN1;-TERM UTILITY (AI.AIZ040)' */
do n=1 to 99 while prm<>''
parse var prm line.n';'prm
end
line.0=n-1
"execio" line.0 "diskw parm (stem line. finis)"
2. demo proc
Code: Select all
//SP EXEC PGM=IKJEFT1B,
// PARM='%SPLITP &DB2ID;&CMD'
//SYSEXEC DD DISP=SHR,DSN=SYSA.EXEC
//SYSTSPRT DD DUMMY
//SYSTSIN DD DUMMY
//PARM DD UNIT=SYSDA,DISP=(,PASS),DSN=&&PARMS,
// RECFM=FB,LRECL=80,BLKSIZE=4080,
// SPACE=(TRK,(5,5))
//GO EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT1 DD DISP=SHR,DSN=&&PARMS
//SYSUT2 DD SYSOUT=*
//*
-
- Posts: 31
- Joined: Fri Nov 27, 2020 12:28 am
- Skillset: REXX,JCL,COBOL,DB2,VSAM
- Referer: Word of mouth
Re: Using Symbolic parm in PROC's SYSTSIN
Thanks a lot sergeyken for all your inputs on this. It helped to derive a conclusion !!
Thanks Willy for your inputs too !!
Thanks Willy for your inputs too !!
-
- Similar Topics
- Replies
- Views
- Last post
-
- 4
- 2689
-
by enrico-sorichetti
View the latest post
Fri Dec 18, 2020 7:59 pm
-
-
Pass PARM from JCL to Easytrieve SQL WHERE clause
by MemoPerez » Tue Oct 24, 2023 8:32 am » in CA-Easytrieve - 2
- 3116
-
by MemoPerez
View the latest post
Fri Oct 27, 2023 1:13 am
-
-
-
Execute PARM with more than 100 chars including variabl
by jcdm » Tue Mar 15, 2022 10:32 pm » in JCL - 9
- 3444
-
by Robert Sample
View the latest post
Tue Mar 29, 2022 7:00 pm
-
-
-
PROTECT parm of ALLOCATE cmd of AMS (IDCAMS) failed
by futohomok » Wed Nov 27, 2024 9:53 pm » in VSAM/SMS - 7
- 2492
-
by futohomok
View the latest post
Mon Dec 02, 2024 4:33 pm
-
-
- 4
- 5620
-
by NicC
View the latest post
Mon Oct 19, 2020 1:17 am