I'm trying to run an edit macro from batch. Below is the JCL, edit macro, and REXX. It works online but not in batch. It appears the edit macro is not being called. What am I doing wrong? Also, I'm attaching the output of my JCL.
*******************************************************
BATCH JCL
*******************************************************
//STEP01 EXEC PGM=IKJEFT01,DYNAMNBR=120
//ISPPROF DD DISP=SHR,DSN=E675.CMN.ISPF.ISPPROF
//ISPPLIB DD DISP=SHR,DSN=SYSSM.ISP.SYSTEMS.ISPPLIB
// DD DISP=SHR,DSN=ISP.SISPPENU
//ISPMLIB DD DISP=SHR,DSN=SYSSM.ISP.SYSTEMS.ISPMLIB
// DD DISP=SHR,DSN=ISP.SISPMENU
//ISPSLIB DD DISP=SHR,DSN=SYSSM.ISP.SYSTEMS.ISPSLIB
// DD DISP=SHR,DSN=ISP.SISPSENU
// DD DISP=SHR,DSN=ISP.SISPSLIB
//ISPTLIB DD DISP=SHR,DSN=SYSSM.ISP.SYSTEMS.ISPTLIB
// DD DISP=SHR,DSN=ISP.SISPTENU
//SYSEXEC DD DISP=SHR,DSN=SYSSU.REXX.EXEC
// DD DISP=SHR,DSN=SYSSU.PROCLIB
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
PROFILE PREFIX(S743SS)
ISPSTART CMD(%CMNPROC2 TEST.PDF ##CMDS)
***********************************
MARCO
***********************************
/*REXX*/
ADDRESS ISPEXEC
SAY "START OF THE MACRO. . . . "
"ISREDIT MACRO"
"ISREDIT (STATUS) = USER_STATE"
"ISREDIT RESET SPECIAL"
"ISREDIT CHANGE X'00' X'40' ALL"
"ISREDIT USER_STATE = (STATUS)"
SAY "END OF THE MACRO. . . ."
EXIT
**********************************
REXX
**********************************
/*REXX*/
ARG FILENAME MACRO1
SAY 'START OF THE REXX. . . . '
SAY 'FILENAME----->'FILENAME
SAY 'MACRCO1----->'MACRO1
ADDRESS ISPEXEC "EDIT DATASET('"FILENAME"') MACRO("MACRO1")"
ADDRESS ISPEXEC "CONTROL ERRORS RETURN"
SAY 'END OF THE REXX. . . . '
EXIT
*******************************************************
BATCH JCL
*******************************************************
//STEP01 EXEC PGM=IKJEFT01,DYNAMNBR=120
//ISPPROF DD DISP=SHR,DSN=E675.CMN.ISPF.ISPPROF
//ISPPLIB DD DISP=SHR,DSN=SYSSM.ISP.SYSTEMS.ISPPLIB
// DD DISP=SHR,DSN=ISP.SISPPENU
//ISPMLIB DD DISP=SHR,DSN=SYSSM.ISP.SYSTEMS.ISPMLIB
// DD DISP=SHR,DSN=ISP.SISPMENU
//ISPSLIB DD DISP=SHR,DSN=SYSSM.ISP.SYSTEMS.ISPSLIB
// DD DISP=SHR,DSN=ISP.SISPSENU
// DD DISP=SHR,DSN=ISP.SISPSLIB
//ISPTLIB DD DISP=SHR,DSN=SYSSM.ISP.SYSTEMS.ISPTLIB
// DD DISP=SHR,DSN=ISP.SISPTENU
//SYSEXEC DD DISP=SHR,DSN=SYSSU.REXX.EXEC
// DD DISP=SHR,DSN=SYSSU.PROCLIB
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
PROFILE PREFIX(S743SS)
ISPSTART CMD(%CMNPROC2 TEST.PDF ##CMDS)
***********************************
MARCO
***********************************
/*REXX*/
ADDRESS ISPEXEC
SAY "START OF THE MACRO. . . . "
"ISREDIT MACRO"
"ISREDIT (STATUS) = USER_STATE"
"ISREDIT RESET SPECIAL"
"ISREDIT CHANGE X'00' X'40' ALL"
"ISREDIT USER_STATE = (STATUS)"
SAY "END OF THE MACRO. . . ."
EXIT
**********************************
REXX
**********************************
/*REXX*/
ARG FILENAME MACRO1
SAY 'START OF THE REXX. . . . '
SAY 'FILENAME----->'FILENAME
SAY 'MACRCO1----->'MACRO1
ADDRESS ISPEXEC "EDIT DATASET('"FILENAME"') MACRO("MACRO1")"
ADDRESS ISPEXEC "CONTROL ERRORS RETURN"
SAY 'END OF THE REXX. . . . '
EXIT