Loading PDS from unloaded PS
Loading PDS from unloaded PS
IEBCOPY can be used for loading a Partitioned Dataset (PDS) from an unloaded file (backup of PDS). Unload files are created using IEBCOPY. Loading a PDS from an unloaded flat file involves recreating a PDS with members from the PS backup.
Practical Example -
Scenario - Re-create or Load a PDS from unloaded PS.
JCL -
----+----1----+----2----+----3----+----4----+----5----+
//MATEPKL JOB (123),'MTH',CLASS=A,MSGCLASS=A,MSGLEVEL=(1,1),
// NOTIFY=&SYSUID
//***************************************************
//* RE-CREATE A NEW PDS FROM UNLOADED PS
//***************************************************
//STEP10 EXEC PGM=IEBCOPY
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSDUMP DD SYSOUT=*
//SYSUT1 DD DSN=MATEPK.IEBCOPY.UNLOADPS,DISP=SHR
//SYSUT2 DD DSN=MATEPK.IEBCOPY.INPPDS1,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(TRK,(10,10,10),RLSE),
// UNIT=3390,VOL=SER=STRVL2,
// DCB=(DSORG=PO,RECFM=FB,LRECL=80,BLKSIZE=800)
//SYSIN DD DUMMY
Job Status -
Output -
Explaining Example -
- SYSUT1 DD DSN=MATEPK.IEBCOPY.INPPDS,.. - Specifies the input unloaded PS file.
- SYSUT2 DD DSN=MATEPK.IEBCOPY.INPPDS1,.. - Specifies the new PDS that needs to create.
- SYSIN DD DUMMY - Load operation doesnt require control statements.