Mainframe Path Start learning free
BeginnerJcl

Copy a sequential dataset

The simplest useful job: IEBGENER with a new output dataset.

COPYJOB
//COPYJOB  JOB (ACCT01),'COPY FILE',CLASS=A,MSGCLASS=X,
//            NOTIFY=&SYSUID
//* delete the target first so the job can be rerun
//DEL      EXEC PGM=IEFBR14
//OLD      DD DSN=DEV.PAY.COPY,DISP=(MOD,DELETE,DELETE),
//            SPACE=(TRK,(1,1)),UNIT=SYSDA
//*
//COPY     EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSUT1   DD DSN=PROD.PAY.TRANS,DISP=SHR
//SYSUT2   DD DSN=DEV.PAY.COPY,DISP=(NEW,CATLG,DELETE),
//            SPACE=(CYL,(10,5),RLSE),
//            DCB=(RECFM=FB,LRECL=200,BLKSIZE=0)
//SYSIN    DD DUMMY

Stuck on something else?
Ask the community or search the full course.

Ask a question