View previous topic :: View next topic
|
Author |
Message |
sivatechdrive
Active User
Joined: 17 Oct 2004 Posts: 191 Location: hyderabad
|
|
|
|
HI all
MY dataset is 'TEST.UES.COBOL(TEST1)'.
I had to insert a new line when 'FRANK' is found, i got the below code from a website But i dont know there to give my input dataset 'TEST.UES.COBOL(TEST1)'.
Can some one please explain me the below Code & where to mention my input dataset & other needed details
/* REXX */
STRING = 'FRANK'
ADDRESS ISPEXEC 'VPUT STRING'
ADDRESS ISPEXEC "EDIT DATASET('UESR.MY.DSN') MACRO(MYMACRO)"
MYMACRO:
ADDRESS ISREDIT
ADDRESS ISPEXEC "VGET STRING"
LINE3 = 'BLUE'
LINE2 = 'RED'
LINE1 = 'ORANGE'
"F" STRING
IF RC > 0 THEN EXIT
"LINE_AFTER .ZCSR = (LINE3)"
"LINE_AFTER .ZCSR = (LINE2)"
"LINE_AFTER .ZCSR = (LINE1)"
"END"
EXIT |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
I'd think that the dataset you want to edit goes right after the "EDIT DATASET". |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
... and make sure that the code for the macro MYMACRO resides in a valid PDS allocated in your TSO session to the SYSPROC DD. |
|
Back to top |
|
|
|