Loading/Copying from Unload Data Sets


For basic information, go through the IEBCOPY Utility (for Beginners)

  • IEBCOPY is used to re-create a PDS from an unloaded copy of a sequential (unloaded) data set.
  • IEBCOPY creates an unload data set by specifying physical organization (DSORG=PS) for the output data set.
  • To create a PDS, specify DSORG=PO and DSNTYPE=PDS or DSNTYPE=LIBRARY.
  • A COPY operation can create an unload data set, whereas COPYMOD cannot.
  • Multiple input PDS can unload into a single PS.
  • A PS in the unload format will have a variable-spanned record format.
  • For unload and load operations, requests are handled similarly to a copy operation.
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.


***************************** Top of Data ******************************
//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)              
//SYSIN    DD DUMMY                                                     
**************************** Bottom of Data ****************************

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.