Author: Csongor
Subject: Reply to: Insert Lines in JCL with Rexx after a particular line
Posted: Tue Aug 30, 2016 6:00 pm (GMT 5.5)
I made some progress, I think this was the hard part. Now I can add lines after a defined line.
I open with Rexx for edit:
And then i use the macro. The key is to define a label (.here), and after that the line_after can be used. I did not succeed to pass variables at first, but I did not try vput vget so far, it should work..
Subject: Reply to: Insert Lines in JCL with Rexx after a particular line
Posted: Tue Aug 30, 2016 6:00 pm (GMT 5.5)
I made some progress, I think this was the hard part. Now I can add lines after a defined line.
I open with Rexx for edit:
Code: |
/*REXX*/ ADDRESS ISPEXEC "EDIT DATASET ('SA81380.AJM.CMD.G0054V00') MACRO(EDITKE2)" EXIT |
And then i use the macro. The key is to define a label (.here), and after that the line_after can be used. I did not succeed to pass variables at first, but I did not try vput vget so far, it should work..
Code: |
/*REXX*/ B=2 ADDRESS ISREDIT "MACRO NOPROCESS" ADDRESS ISREDIT "ISREDIT LABEL" B "= .HERE" ADDRESS ISREDIT "ISREDIT LINE_AFTER .HERE = "DATA" " B=B+1 ADDRESS ISREDIT "ISREDIT LABEL" B "= .HERE" ADDRESS ISREDIT "ISREDIT LINE_AFTER .HERE = "DATA" " ADDRESS ISREDIT "SAVE" ADDRESS ISREDIT "END" |