Hi Everyone,
I have to make mass updates to various pds's,hence I have first run super search and got the members which needs to be updated.
Second step I have extracted the member name using rexx and next step I have written edit macro to make changes to the members.
Here's my code:
//STEP02 EXEC PGM=IRXJCL,PARM='TEST1'
//SYSTSPRT DD SYSOUT=*
//SYSEXEC DD DISP=SHR,DSN=TEST.REXX.PDS
//IN DD DISP=SHR,DSN=TEST.SRCH.LIST
//SYSTSIN DD *
**************************************************************
TEST1
*****************************************************************
/*REXX */
TRACE(I)
"EXECIO * DISKR IN ( STEM INP. FINIS"
TOT=INP.0;CNT=1
DO VV=1 TO TOT
IF ((SUBSTR(INP.VV,41,15) = 'STRING(S) FOUND')) THEN
DO
MEM=SUBSTR(INP.VV,3,8)
OUTP.CNT=MEM ; CNT=CNT+1
FILENAME="TEST.TEST.PDS("STRIP(MEM)")"
ISPEXEC "EDIT DATASET('"FILENAME"') MACRO(SFIND)"
END
END
----------------------------------------------------------------------------
Since there would be many members which would need below edit macro I have used ISPEXEC "EDIT DATASET('"FILENAME"') MACRO(SFIND)" to run below macro
/* REXX */
"ISREDIT MACRO"
ADDRESS ISREDIT
"ISREDIT FIND TEST ALL"
"ISREDIT (FINDS) = FIND_COUNTS"
DO FINDS
"ISREDIT CHANGE * TEST1"
D1="This is test run"
"ISREDIT LINE_BEFORE .ZCSR =(D1)"
"ISREDIT END"
END
But I am getting the below error....
>O> "ISPEXEC EDIT DATASET('TEST.TEST.PDS(TEST1)') MACRO(SFIND)"
+++ RC(-3) +++
The macro is running fine when I do it manually..
Let me know if any further information is required.
Thanks...