Previous Topic: MERGE ARCHIVE ParameterNext Topic: JCL Considerations


Usage

Processing flow

MERGE ARCHIVE uses two input files: SYS001 and JRNM01 and one output file: SYS002. It proceeds by sorting the contents of SYS001 in chronological sequence and then merging the results of the sort with the contents of JRNM01. The resulting merged journal images are then processed and written to SYS002. Control records are also written to SYS002 indicating the range of images for each member that are included on the merged file and an indication of whether or not the output file was created with the COMPLETE option.

Input files

SYS001 is used to supply input that is not in chronological sequence. Typically, archive files from one or more data sharing members are concatenated together as input to SYS001, although it is also possible to include one or more merged files as input. The order of concatenation is not relevant.

JRNM01 is used to supply a single merged archive file. Multiple files cannot be concatenated as input to JRNM01. If no merged archive file exists, then JRNM01 should be specified as dummy.

Incremental merging

To minimize recovery time, journal files can be merged periodically and the output from each merge operation used as input to a subsequent MERGE ARCHIVE.

When merging journal files incrementally, specify the INCOMPLETE option on every MERGE ARCHIVE execution except the final one. The final merge operation before executing a ROLLFORWARD or ROLLBACK utility statement must specify the COMPLETE option.

Using disk files

It is possible to use disk files for merged journal files. This can be beneficial for incremental merging, since all intermediate merged files can reside on disk. Only the final merged file (the one created with the COMPLETE option) may need to be written to tape so that ROLLFORWARD or ROLLBACK can process it.

Incomplete transactions

If a transaction is encountered whose initial checkpoint record (BGIN) is not contained on the input files being processed, a warning message is written that will result in a return code of 4. This is not necessarily an error, since missing journal images can be merged at a later time; however, the missing journal records might need to be provided before the merged file can be used for recovery purposes. For more information, see the ROLLFORWARD or ROLLBACK utility commands.

MERGE ARCHIVE and Distributed Transactions

MERGE ARCHIVE reports on distributed transactions and supports the use of input and output manual recovery control files. If COMPLETE is specified, the input manual recovery control file is used to complete InDoubt distributed transactions. If an output manual recovery control file is included in the JCL, an entry will be written for each incomplete distributed transaction encountered. For more information, see JCL Considerations and the "Common Facilities for Distributed Transactions" appendix.

Note: For considerations associated with distributed transactions during recovery operations, see the CA IDMS Database Administration Guide.