/* REXX */ Address TSO /* capture the JESJCL dataset */ /* for the current job */ 'ALLOC SP(1) TRACK UNIT(VIO) RECFM(F B) LRECL(80) BLKSIZE(4000) REU', 'FI(ISFIN)' /* generate SDSF control statements */ out.1 = 'DA OJOB' /* capture the jobname */ myjob = MVSVAR('SYMDEF','JOBNAME') out.2 = 'Find 'myjob out.3 = '++?' out.4 = "Find 'JESJCL'" out.5 = '++S' out.6 = 'Print File JCL' out.7 = 'Print' out.8 = 'Print Close' 'EXECIO 7 DISKW ISFIN (STEM out. FINIS)' 'ALLOC SP(1) TRACK UNIT(VIO) RECFM(V B) LRECL(150) BLKSIZE(4000) REU', 'FI(JCL)' 'ALLOC DUMMY FI(ISFOUT) RECFM(V B) LRECL(150) BLKSIZE(150) REU' /* invoke SDSF */ "CALL *(SDSF)" /* read the captured output */ 'EXECIO * DISKR JCL 1 (STEM in. FINIS)' Do i = 1 to in.0 /* if it looks like a SET statement */ /* Note that this does not parse a JCL SET statement */ /* which assigns variables to multiple variables */ If Pos(' SET ',in.i) \= 0 then Do Parse Var in.i '//' label 'SET ' name '=' value If name \= '' & WORDS(label) <= 1 & label \= '*' then Do /* echo the input JCL statement */ Say in.i /* quoted string (or not) */ If Left(value,1) = "'" then , Parse Var Value "'"Value"'" Else , Parse Var Value Value . /* echo the parsed value */ Say '>' name '=' '"'value'"' End End End i 'FREE FI(ISFIN ISFOUT JCL)' Exit 0