//JCLTEST JOB 'JCL TEST',CLASS=B,MSGCLASS=A
//*
//* DELETE EXISTING DATASETS
//*
//GETRID   EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN    DD *
  DELETE MFIJCL.OUTFILE.DATA
  SET    MAXCC=0
//*
//* ALLOCATE AND WRITE RECORDS TO A DATASET FROM A USER PROGRAM
//*
//CREATE   EXEC PGM=JCLCREAT
//OUTFILE  DD DSN=MFIJCL.OUTFILE.DATA,DISP=(,CATLG),
//         DCB=(LRECL=80,RECFM=FB,DSORG=PS),
//         SPACE=(800,(10,10)),UNIT=SYSDA
//SYSOUT   DD SYSOUT=A
//*
//* USE THE IEBGENER SYSTEM UTILITY TO COPY RECORDS INTO A TEMPORARY
//* DATASET AND PASS ON FOR USE BY SUBSEQUENT STEPS
//*
//GENER    EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSUT1   DD *
Rec 1
Rec 2
Rec 3
Rec 4
Rec 5
//SYSUT2   DD DSN=&&JTEMP,DISP=(,PASS),
//         DCB=(LRECL=80,RECFM=FB,DSORG=PS),
//         SPACE=(800,(10,10)),UNIT=SYSDA
//*
//* READ RECORDS FROM THE TEMPORARY DATASET CREATED IN THE PREVIOUS
//* STEP
//*
//READ     EXEC PGM=JCLREAD
//INFILE   DD DSN=&JTEMP,DISP=(OLD,DELETE)
//SYSOUT   DD SYSOUT=A
//
