- Trending Categories
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.
- Related Articles
- How to delete a DB2 table TAB1?
- How to find out all the indexes for a DB2 table TAB1?
- How to create an ALIAS TAB2 for DB2 table TAB1?
- How to add a row compression to a DB2 table TAB1?
- How to find the primary key of a DB2 table TAB1?
- How to get the list of all COBOL-DB2 programs using a DB2 table TAB1?
- How to image copy the entire DB2 table TAB1 into a dataset?
- How to find all the foreign keys of a DB2 table TAB1?
- How to add a new column Address in the above DB2 table TAB1?
- How will you add a constraint on above DB2 table TAB1 for ages between 3 to 16 years?
- How to create a DB2 table TAB1 with 4 columns, Student ID, Enrollment ID, Name and Age?
- How to create a table TAB2 having same attributes & columns as for table TAB1
- How to add a unique index on the above table TAB1 for column Enrollment ID (ascending)?
- How to create a view on table TAB1 for column Name, age, enrollmentId & age > 10 years. >
- How to store a NULL value in a particular column of a DB2 table using COBOL-DB2 program?
