Using Symbolic parm in PROC's SYSTSIN

JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...
User avatar
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

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

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.
Javas and Pythons come and go, but JCL and SORT stay forever.

willy jensen
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

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

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=*                                            
//*                                                                

Misha786
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

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 !!


  • Similar Topics
    Replies
    Views
    Last post