(My requirement here is I am suppose to read the member name from a PDS and edit my jcl steps to run a bind job through the same rexx on all the elements present in the PDS.)
below is my code
/* REXX PDS */
THEPDS = "'MSP2148.TEST.DBRM'"
QUEUE "//MSP2148 JOB D20081000000,'BIND ',CLASS=C,MSGCLASS=C,"
QUEUE "// NOTIFY=&SYSUID "
X = OUTTRAP('ML.')
"LISTDS "THEPDS" MEMBERS"
X = OUTTRAP('OFF')
DO N = 7 TO ML.0
PARSE VAR ML.N MEMBER
MEMBER=STRIP(MEMBER)
QUEUE "//************************************************************"
QUEUE "//BIND EXEC PGM=IKJEFT01"
QUEUE "//SYSTSPRT DD SYSOUT=*"
QUEUE "//SYSPRINT DD SYSOUT=*"
QUEUE "//DBRMLIB DD DISP=SHR,DSN=XY.A.FFFF.DBRM"
QUEUE "// DD DISP=SHR,DSN=XY.PDB2B.FFFF.DBRM"
QUEUE "// DD DISP=SHR,DSN=XY.PDB2B.SHARED.DBRM"
QUEUE "//SYSIN DD DUMMY "
QUEUE "//SYSTSIN DD * "
QUEUE "DSN SYSTEM(DB2E) "
QUEUE " BIND PACKAGE (CFFAAAU1) - "
QUEUE " OWNER (DB2AAAU1) - "
QUEUE " QUALIFIER (DB2AAAU1) - "
QUEUE " MEMBER ("MEMBER") - "
QUEUE " ACTION (REPLACE) - "
QUEUE " VALIDATE (BIND) - "
QUEUE " ISOLATION (UR) - "
QUEUE " CURRENTDATA (NO) - "
QUEUE " RELEASE (COMMIT) - "
QUEUE " EXPLAIN (YES) "
QUEUE "$$"
O=OUTTRAP("OUTPUT.",,"CONCAT")
"SUBMIT * END ($$)"
O=OUTTRAP(OFF)
SAY "MEMBER NAME IS ==>" MEMBER
END
EXIT
THEPDS = "'MSP2148.TEST.DBRM'"
QUEUE "//MSP2148 JOB D20081000000,'BIND ',CLASS=C,MSGCLASS=C,"
QUEUE "// NOTIFY=&SYSUID "
X = OUTTRAP('ML.')
"LISTDS "THEPDS" MEMBERS"
X = OUTTRAP('OFF')
DO N = 7 TO ML.0
PARSE VAR ML.N MEMBER
MEMBER=STRIP(MEMBER)
QUEUE "//************************************************************"
QUEUE "//BIND EXEC PGM=IKJEFT01"
QUEUE "//SYSTSPRT DD SYSOUT=*"
QUEUE "//SYSPRINT DD SYSOUT=*"
QUEUE "//DBRMLIB DD DISP=SHR,DSN=XY.A.FFFF.DBRM"
QUEUE "// DD DISP=SHR,DSN=XY.PDB2B.FFFF.DBRM"
QUEUE "// DD DISP=SHR,DSN=XY.PDB2B.SHARED.DBRM"
QUEUE "//SYSIN DD DUMMY "
QUEUE "//SYSTSIN DD * "
QUEUE "DSN SYSTEM(DB2E) "
QUEUE " BIND PACKAGE (CFFAAAU1) - "
QUEUE " OWNER (DB2AAAU1) - "
QUEUE " QUALIFIER (DB2AAAU1) - "
QUEUE " MEMBER ("MEMBER") - "
QUEUE " ACTION (REPLACE) - "
QUEUE " VALIDATE (BIND) - "
QUEUE " ISOLATION (UR) - "
QUEUE " CURRENTDATA (NO) - "
QUEUE " RELEASE (COMMIT) - "
QUEUE " EXPLAIN (YES) "
QUEUE "$$"
O=OUTTRAP("OUTPUT.",,"CONCAT")
"SUBMIT * END ($$)"
O=OUTTRAP(OFF)
SAY "MEMBER NAME IS ==>" MEMBER
END
EXIT
Error I am getting on executing the rexx
A command entered or contained in a CLIST has invalid syntax.
***