- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to do a full & incremental MERGECOPY for a DB2 table TAB1?
The MERGECOPY is just opposite of IMAGECOPY. This DB2 utlility is used to combine the multiple image copy datasets into a new full or incremental image copy. This is mainly used to restore the backup in the DB2 table.
The below JCL step can be used for the incremental MERGECOPY for DB2 table TAB1 which is residing in the database DBSET1−
//STEP010 EXEC DSNUPROC //COPY1 DD DSN=TEST.DB2.COPY1,DISP=(MOD,CATLG,CATLG), // UNIT=SYSDA,SPACE=(4000,(20,20),,,ROUND) //COPY2 DD DSN=TEST.DB2.COPY2,DISP=(MOD,CATLG,CATLG), // UNIT=SYSDA,SPACE=(4000,(20,20),,,ROUND) //SYSOUT DD SYSOUT=* //SYSIN DD * MERGECOPY TABLESPACE DBSET1.TBSPAC01 COPYDDN (COPY1,COPY2) NEWCOPY NO
The COPY1 and COPY2 are the incremental image copy datasets. The SYSIN parameter has the statement MERGECOPY TABLES which is followed by the name of tablespace in which the table TB01 resides. The tablespaces have to be qualified by a database name.
The COPYDDN statement is followed by the incremental image copy datasets which need to be combined.
The NEWCOPY NO indicates this is an incremental merge copy. For full merge copy we will use NEWCOPY YES.