Code conversion issue while reading JCL using REXX
Posted: Fri Jun 19, 2020 10:19 pm
Hi Experts/Forum members,
For developing a REXX routine to process JCL statements to search and replace symbolic variables (with different masking format like 'YYDDD' for Julian date or 'YY-MM-DD' for Current Calendar date) in any position in the JCL statement. I have an indicator for such statements: '!' in column 66 with different codes for different date formats/values.
I will have to search for '!' to identify JCL statement with a date mask, say, 'YYDDD', then replace it with '20170' and write this JCL member into a different PDS for current day's test run.
Weirdly, when I used the REXX POS function to search for '!' in column 66, the statement of some of the JCL members were internally converted into a different code format that left this check for '!' with incorrect result - returned as '0' even though I see '!' on that statement through 3.4 screen.
Example:
Original statement is
TRACE result shows
Please advise if there is any other alternative way/logic using which I can programmatically (REXX) correctly check for the code indicator on such JCL statements.
Thank you for your time and inputs,
Sivagurunathan V
For developing a REXX routine to process JCL statements to search and replace symbolic variables (with different masking format like 'YYDDD' for Julian date or 'YY-MM-DD' for Current Calendar date) in any position in the JCL statement. I have an indicator for such statements: '!' in column 66 with different codes for different date formats/values.
I will have to search for '!' to identify JCL statement with a date mask, say, 'YYDDD', then replace it with '20170' and write this JCL member into a different PDS for current day's test run.
Weirdly, when I used the REXX POS function
POS(needle,haystack[,startcix])
Example:
Original statement is
// OCYCLE=DXYYDDD1 CURRENT DATE !AAA 00109001
TRACE result shows
// OCYCLE=DXYYDDD1?FCURRENT?CDATE?C!AAA?G00109001B//*àG00109101.
Please advise if there is any other alternative way/logic using which I can programmatically (REXX) correctly check for the code indicator on such JCL statements.
Thank you for your time and inputs,
Sivagurunathan V