Monday, September 26, 2011

DB2: Sample job to unload data from the image copy


The below job will unload data from the image copy

//STEP1    EXEC PGM=INZUTILB,REGION=0M,DYNAMNBR=99,                   
//         PARM='DBXT,UNLD'                                       
//STEPLIB  DD  DSN=DBDCXXX.HPU.DBXT.SINZLINK,DISP=SHR                 
//         DD  DSN=DBDCXXX.DB2.DBXT.SDSNEXIT,DISP=SHR                 
//         DD  DSN=DBDCXXX.DB2.DBXT.SDSNLOAD,DISP=SHR                 
//COPYIN   DD  DSN=image copy dataset..
//*                                                                    
//SREC001  DD DSN=output dataset
//            DISP=(,CATLG),UNIT=(SYSDA,59),BUFNO=100,                
//            SPACE=(CYL,(50,50),RLSE)                                
//*                                                                   
//SYSPUNCH DD DSN=SYSPUNCH dataset…
//            DISP=(,CATLG),UNIT=(SYSDA,15),                          
//            SPACE=(CYL,(1,5),RLSE)                                  
//UTPRINT  DD  SYSOUT=*                                               
//SYSPRINT DD  SYSOUT=*                                               
//SYSIN    DD  *                                                      
  UNLOAD TABLESPACE                                                   
  DB2 NO COPYDDN COPYIN                                              
  SELECT  *                              
  FROM MY.TAB;
  OUTDDN (SREC001)                       
  FORMAT DSNTIAUL                        
  LOADDDN SYSPUNCH                       
/*                                       

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.