Now i'm trying to insert a line and include this "PLIST (MYLIST) - " in the inserted line.
JCL - MYREX (Submitting this jcl using REXX - REX3)
//MYEX EXEC PGM=IKJEFT01,PARM='REX3'
//SYSEXEC DD DISP=SHR,DSN=MORIGIN.LOP.JCL
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD DUMMY
//FILELIST DD *
MORIGIN.MAIL.TEXT(MYMEM)
//*
//SYSEXEC DD DISP=SHR,DSN=MORIGIN.LOP.JCL
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD DUMMY
//FILELIST DD *
MORIGIN.MAIL.TEXT(MYMEM)
//*
REXX - REX3 (Called by jcl MYREX)
/* REXX */
ADDRESS ISREDIT "MACRO (STRING)"
ADDRESS ISREDIT "SCAN OFF"
ADDRESS ISREDIT "SEEK " STRING "FIRST"
LINE1= "PKLIST (MYLIST) - "
IF RC > 0 THEN EXIT
ADDRESS ISREDIT "(RETAIN) = "CURSOR
ADDRESS ISREDIT "LINE_AFTER .ZCSR = " (LINE1)
SAVE
EXIT
ADDRESS ISREDIT "MACRO (STRING)"
ADDRESS ISREDIT "SCAN OFF"
ADDRESS ISREDIT "SEEK " STRING "FIRST"
LINE1= "PKLIST (MYLIST) - "
IF RC > 0 THEN EXIT
ADDRESS ISREDIT "(RETAIN) = "CURSOR
ADDRESS ISREDIT "LINE_AFTER .ZCSR = " (LINE1)
SAVE
EXIT
Member (MYMEM) contents (Need to add line and the string in this member)
//CHECKING FURTHER
ACTION (REPLACE) RETAIN -
MYNAME (PKLIST) -
//*
ACTION (REPLACE) RETAIN -
MYNAME (PKLIST) -
//*
After insert it should look like
//CHECKING FURTHER
ACTION (REPLACE) RETAIN -
PLIST (MYLIST) -
MYNAME (PKLIST) -
//*
ACTION (REPLACE) RETAIN -
PLIST (MYLIST) -
MYNAME (PKLIST) -
//*
My MYREX job does return RC=0, but no changes in the member.
How do i insert a line after "ACTION" string and add this "PLIST (MYLIST) - " in the line?
If there are multiple lines to be inserted how do i do?
Or any other method? (I have no idea about usage of macro)