I create one rexx which copy the input pds to the output pds which are pass thru the sequential dataset.
I am submitting this rexx thru JCL. But on passing the dataset thru JCL i am getting the below error messages:-
VM.LAT.D10A010.PC.JCLLIB
'VM.LAT.D10A010.PC.JCLLIB(VPAADA10)'
28 *-* "LMINIT DATAID("DATA1")DATASET("INDD1")ENQ(SHR)"
+++ RC(-3) +++
29 *-* "LMINIT DATAID("DATA2")DATASET("OUTDD")ENQ(SHR)"
+++ RC(-3) +++
30 *-* "LMCOPY FROMID("DATA1")FROMMEM("MEMBER")TODATAID("DATA2")
+++ RC(-3) +++
VM.LAT.D10A010.PC.JCLLIB
'VM.LAT.D10A010.PC.JCLLIB(VPAADA20)'
28 *-* "LMINIT DATAID("DATA1")DATASET("INDD1")ENQ(SHR)"
+++ RC(-3) +++
29 *-* "LMINIT DATAID("DATA2")DATASET("OUTDD")ENQ(SHR)"
+++ RC(-3) +++
30 *-* "LMCOPY FROMID("DATA1")FROMMEM("MEMBER")TODATAID("DATA2")
+++ RC(-3) +++
VM.LAT.D10A010.PC.JCLLIB
'VM.LAT.D10A010.PC.JCLLIB(VPAADB10)'
28 *-* "LMINIT DATAID("DATA1")DATASET("INDD1")ENQ(SHR)"
+++ RC(-3) +++
VM.LAT.D10A010.PC.JCLLIB
'VM.LAT.D10A010.PC.JCLLIB(VPABDB20)'
28 *-* "LMINIT DATAID("DATA1")DATASET("INDD1")ENQ(SHR)"
+++ RC(-3) +++
29 *-* "LMINIT DATAID("DATA2")DATASET("OUTDD")ENQ(SHR)"
+++ RC(-3) +++
30 *-* "LMCOPY FROMID("DATA1")FROMMEM("MEMBER")TODATAID("DATA2")
+++ RC(-3) +++
READY
END
This is my jcl code
000001 //COPYJCL1 JOB (0000,REXX),'DEV11',CLASS=6,MSGCLASS=A,
000002 // USER=PAFK,
000003 // TIME=(60,00)
000004 //STEP30 EXEC PGM=IKJEFT01,PARM='%COPYMEM'
000005 //SYSEXEC DD DSN=VM.LAT.D10A.PF.REXX,DISP=SHR
000006 //INDD DD DSN=VM.LAT.D10A010.PC.JCLLIB,DISP=SHR
000007 //OUTDD DD DSN=VM.LAT.D10A010.PF.JCLLIB.CMS,DISP=SHR
000008 //SYSPRINT DD SYSOUT=*
000009 //SYSTSPRT DD SYSOUT=*
000010 //SYSTSIN DD DUMMY
This is my rexx code
"ALLOC F(INFILE) DSN('VM.LAT.D10A.DETAILS.SE.VP.CMS2')SHR REUSE"
"EXECIO * DISKR INFILE( FINIS STEM MYFILE."
"FREE F(INFILE)"
Address 'ISPEXEC'
ARG INDD OUTDD NFLAG
UPPER INDD OUTDD NFLAG
CC = Listdsi('INDD FILE')
INDD="'"SYSDSNAME"'"
CC1 = Listdsi('OUTDD FILE')
OUTDD="'"SYSDSNAME"'"
PARSE VAR INDD WITH "'" INDD1 "'"
DO I = 1 TO MYFILE.0
MEMBER = STRIP(MYFILE.I)
SAY INDD1
LOOKFOR = "'"INDD1"("MEMBER")'"
SAY LOOKFOR
X = SYSDSN(LOOKFOR)
IF X = 'OK' THEN DO
"LMINIT DATAID("DATA1")DATASET("INDD1")ENQ(SHR)"
"LMINIT DATAID("DATA2")DATASET("OUTDD")ENQ(SHR)"
"LMCOPY FROMID("DATA1")FROMMEM("MEMBER")TODATAID("DATA2")
REPLACE PACK"
END
ELSE
do
SAY MEMBER 'NOT FOUND IN ' INDD1
END
END
EXIT