As I am used two dataset in rexx and oth dataset I am calling via JCL by using cc=Listdsi('ddname FILE') combination.
But mine JCL is executed with MAX CC 0 but I am not getting the data population in the output file.
below is my rexx code
000100 /*REXX*/
000200 ADDRESS TSO
000300 CC = Listdsi('FILEI FILE')
000400 CC = Listdsi('FILEO FILE')
000500 FILEI="'"SYSDSNAME"'"
000600 FILEO="'"SYSDSNAME"'"
000700 SAY HI
000800 SAY FILEI
000900 "LISTDS" FILEI "MEMBERS"
001000 WRT = 1
001100 X = OUTTRAP(MEMBERS.)
001200 "LISTDS" FILEI "MEMBERS"
001300 X = OUTTRAP(OFF)
001400 DO I=7 TO MEMBERS.0
001500 X = STRIP(MEMBERS.I)
001600 FILEO.WRT = X
001700 WRT = WRT + 1
001800 END
001900 WRT = WRT - 1
002000 OUT.0 = WRT
002100 FILEO = OUT.0
002200 OU1 = fileo
002300 "EXECIO "OUT.0" DISKW OU (STEM OUT. FINIS"
002400 "FREE F(OU)"
002500 SAY "MEMBERS SUCCESSFULLY WRITE"
002600 EXIT
This rexx taking input pds member and copy all the member into one sequential dataset.
Note:- The pds dataset and sequential dataset I am passing thru the JCL.
Below is the JCL
****** ***************************** Top of Data ******************************
000001 //PAFKREX2 JOB (0000,REXX),'DEV11',CLASS=Y,MSGCLASS=A,
000002 // USER=PAFK
000003 //STEP30 EXEC PGM=IKJEFT01,PARM='%GETMEM1'
000004 //SYSEXEC DD DSN=TS.PAFK.SUSHIL.PDS,DISP=SHR
000005 //FILEI DD DSN=VM.LAT.D10A010.PF.JCLLIB.SASH,DISP=SHR
000006 //FILEO DD DSN=VM.LAT.D10A.PF.V10.JOB.SE.SASH8,DISP=SHR
000007 //SYSPRINT DD SYSOUT=*
000008 //SYSTSPRT DD SYSOUT=*
000009 //SYSTSIN DD DUMMY
**************************************************************************
iN MY JCL EXECUTION IT TREATED BOTH FILEI AND FILE O as 'VM.LAT.D10A.PF.V10.JOB.SE.SASH8' dataset.