Page 2 of 2

Re: Using Symbolic parm in PROC's SYSTSIN

PostPosted: Sun Nov 29, 2020 9:07 pm
by sergeyken
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.

Re: Using Symbolic parm in PROC's SYSTSIN

PostPosted: Mon Nov 30, 2020 3:01 pm
by willy jensen
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                                      
 end                                                              
 line.0=n-1                                                        
 "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=*                                            
//*                                                                

Re: Using Symbolic parm in PROC's SYSTSIN

PostPosted: Mon Nov 30, 2020 9:32 pm
by Misha786
Thanks a lot sergeyken for all your inputs on this. It helped to derive a conclusion !!
Thanks Willy for your inputs too !!