How to image copy the entire DB2 table TAB1 into a dataset?

DB2DatabaseBig Data Analytics

The image copy allows us to download or copy the DB2 table into a mainframe dataset. There are two types of Image copy i.e. Full image copy and Incremental image copy. The full image copy is used to take the backup of the entire table. The incremental image copy refers to the differential backup. In order to take the full image copy of the DB2 table we can use the below JCL step.

//STEP1 EXEC DSNUPROC
//SYSCOPY DD DSN=TEST.TAB1.COPY,UNIT=SYSDA,VOL=SER=CPY01I,
// SPACE=(CYL,(15,1)),DISP=(NEW,CATLG,CATLG)
//SYSOUT DD SYSOUT=*
//SYSIN DD *
COPY TABLESPACE TAB1SPAC
/*

We can use the utility DSNUPROC for this purpose. The SYSCOPY will have the dataset in which we want to take the backup of the table. The SYSIN is populated with the parameter COPY TABLESPACE which is followed by the name of tablespace where the table TAB1 resides.

raja
Published on 12-Sep-2020 14:31:52
Advertisements