Loading PDS from unloaded PS

  • IEBCOPY is used to re-create a PDS from a PS (unloaded backup of PDS).
  • To create a PDS, specify DSORG=PO and DSNTYPE=PDS or DSNTYPE=LIBRARY.
  • A PS in the unload format will have a variable-spanned record format.
  • A single unloaded PS file can re-create multiple output PDS.
Note! A load operation cannot convert unloaded load modules to program objects or vice versa.

Practical Example -

Scenario - Re-create or Load a PDS from unloaded PS.


//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=*                                                  
//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)              

Job Status -

EXCLUDE 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.