Copy PS Data to fixed-length RRDS Example


Scenario - Copy the data from the PS file to fixed-length RRDS.

JCL -

----+----1----+----2----+----3----+----4----+----5----+
//MATEGJR JOB (123),'MTH',CLASS=A,MSGCLASS=A,
//             MSGLEVEL=(1,1),NOTIFY=&SYSUID 
//**********************************************
//* LOADING DATA TO RRDS FROM PS(FLAT FILE)
//**********************************************
//STEP01   EXEC PGM=IDCAMS 
//SYSPRINT DD   SYSOUT=*
//INPUT    DD   DSN=MATEGJ.TEST.DATA,DISP=SHR
//OUTPUT   DD   DSN=MATEGJ.TEST.RRDS,DISP=SHR
//SYSIN    DD   *
      REPRO    -
           INFILE(INPUT)   - 
           OUTFILE(OUTPUT)
/*

In the above JCL, MATEGJ.TEST.DATA is the flat file and MATEGJ.TEST.RRDS is the RRDS file.

Output -

Once the above JCL is submitted, check the MAXCC of the job for any errors. If the MAXCC is 00 or 04, RRDS successfully loaded with records.

loading RRDS Output

Verify the RRDS in 3.4 (Dataset List utility) or any File management tools.

loading RRDS Output

Explaining Example -

In the above example, all the records from the MATEGJ.TEST.DATA(flat file of length 47) file copied to MATEGJ.TEST.RRDS(RRDS file of length 47) file.