Using Symbolic parm in PROC's SYSTSIN

JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Re: Using Symbolic parm in PROC's SYSTSIN

Postby sergeyken » Sun Nov 29, 2020 9:07 pm


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.
Javas come and go, but JCL stays forever.
User avatar
Posts: 152
Joined: Wed Jul 24, 2019 10:12 pm
Has thanked: 3 times
Been thanked: 13 times

Re: Using Symbolic parm in PROC's SYSTSIN

Postby willy jensen » Mon Nov 30, 2020 3:01 pm

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
/* rexx */                                                        
 parse arg prm /* i.e. 'DSN1;-TERM UTILITY (AI.AIZ040)' */        
 do n=1 to 99 while prm<>''                                        
   parse var prm line.n';'prm                                      
 "execio" line.0 "diskw parm (stem line. finis)"  

2. demo proc
//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=*                                            
willy jensen
Posts: 327
Joined: Thu Mar 10, 2016 5:03 pm
Has thanked: 0 time
Been thanked: 44 times

Re: Using Symbolic parm in PROC's SYSTSIN

Postby Misha786 » Mon Nov 30, 2020 9:32 pm

Thanks a lot sergeyken for all your inputs on this. It helped to derive a conclusion !!
Thanks Willy for your inputs too !!
Posts: 12
Joined: Fri Nov 27, 2020 12:28 am
Has thanked: 0 time
Been thanked: 0 time


Return to JCL


  • Related topics
    Last post