IBM Books

Replication Guide and Reference


Operating Capture for OS/390

An administrator can use the commands in this section to perform the following Capture for OS/390 tasks:

You can submit the commands from TSO or the MVS console.

This section also lists restrictions for running the Capture program.

Restrictions for running the Capture program

Capture for OS/390 cannot replicate certain types of data. See Data restrictions for a list of restrictions.

Only one instance of the Capture program can run on a subsystem. In a data-sharing environment, only one of any member subsystems in a data-sharing group can run the Capture program. In a data-sharing environment, DB2 presents merged log records from all member subsystems.

Starting Capture for OS/390

After you start the Capture program, it runs continuously until you stop it or it detects an unrecoverable error.

To start the Capture for OS/390 program:

  1. Prepare the JCL for OS/390 by specifying the appropriate optional invocation parameters in the PARM field of the ASNL2RNx DD statement. Customize the JCL to meet your site's requirements.

    An example of this line in the invocation JCL is:

    //ASNL2RNx EXEC PGM=ASNLRPnn,PARM='DB2_subsystem_name NOTERM WARMNS SLEEP=2'
    
    where x and nn indicate the level of the Capture program, as follows:

  2. Submit the JCL from TSO or from the MVS console. Capture for OS/390 can run either as a batch job or a started task.

Table 8 defines the invocation parameters.

Table 8. ASNLRP Invocation Parameter Definitions for OS/390
Parameter Definition
DB2_subsystem_name Specifies the name of the DB2 subsystem that can connect to the control server. The default for the subsystem name is DSN. This parameter must be the first parameter.

For data sharing, do not use the group attach name. Instead, specify a member subsystem name.

TERM  (default)  Terminates the Capture program if DB2 is terminated.
NOTERM Keeps the Capture program running if DB2 is terminated with MODE(QUIESCE). When DB2 initializes, the Capture program starts in WARM mode and begins capturing where it left off when DB2 terminated.

If DB2 terminates via FORCE or due to abnormal termination, the Capture program terminates even if you selected this parameter.

If you use the NOTERM option and start DB2 with restricted access (ACCESS MAINT), the Capture program will not be able to connect and will terminate.

WARM  (default)  The Capture program resumes processing where it ended in its previous run if warm start information is available. If the Capture program cannot warm start, it switches to a cold start.
WARMNS The Capture program resumes processing where it ended in its previous run if warm start information is available. Otherwise, it issues a message and terminates. With WARMNS, the Capture program does not automatically switch to a cold start. The Capture program leaves the trace, UOW, CD, and warm start tables intact. In case of errors, the Capture program terminates instead of switching to a cold start as when WARM is specified.
COLD The Capture program starts up by deleting all rows in its CD table, UOW table, and trace table during initialization. All subscriptions to these replication sources will be fully refreshed during the next Apply program processing cycle.
PRUNE  (default)  The Capture program automatically prunes the rows in the CD and UOW tables that the Apply program copied, at the interval specified in the tuning parameters table.
NOPRUNE Automatic pruning is disabled. The Capture program prunes the CD and UOW tables when you enter the PRUNE command.
NOTRACE  (default)  No trace information is written.
TRACE Writes trace messages to the standard output, SYSPRINT.
SLEEP=n Where n is the number of seconds that the Capture program will wait when it finishes processing the active log. This parameter is available for the Capture program running on DB2 for MVS Version 4 Release 1 and later with data sharing. The default is SLEEP=0.
ALLCHG  (default)  Specifies that an entry is made to the CD table whenever a source table row changes.
CHGONLY Specifies that an entry is made to the CD table when a source table row changes only if the columns defined for replication (CD table columns) change values.

Scheduling Capture for OS/390

Use either the $TA JES2 command or the AT NetView command to start Capture for OS/390 at a specific time. You must:

  1. Create a procedure that calls Capture for OS/390 in the PROCLIB.

  2. Modify the ICHRIN03 RACF module (or appropriate definitions for your MVS security package) to associate the procedure with a user ID.

  3. Link-edit the module in SYS1.LPALIB.

Stopping Capture for OS/390

Use the STOP command to stop the Capture program gracefully and commit the log records that it processed up to that point.

>>-F--jobname--,STOP-------------------------------------------><
 

Issue the STOP command before:

Suspending Capture for OS/390

Use the SUSPEND command to relinquish OS/390 resources to operational transactions during peak periods without destroying the Capture program environment. This command suspends the Capture program until you issue the RESUME command.

>>-F--jobname--,SUSPEND----------------------------------------><
 

Important: Do not use SUSPEND when canceling a replication source. Instead, stop the Capture program by entering the STOP command.

Resuming Capture for OS/390

Use the RESUME command to resume the suspended Capture program.

>>-F--jobname--,RESUME-----------------------------------------><
 

Reinitializing Capture for OS/390

Use the REINIT command to begin to capture changes from new source tables if you add a new replication source or ALTER ADD a column to a replication source and CD table while the Capture program is running. The REINIT command tells the Capture program to obtain newly added replication sources from the register table.

REINIT also rereads the tuning parameters table for any changes made to the tuning parameters.

>>-F--jobname--,REINIT-----------------------------------------><
 

Important: Do not use the REINIT command to reinitialize the Capture program after canceling a replication source or dropping a replication source table while the Capture program is running. Instead, stop the Capture program and start it again using the WARM or WARMNS option.

Pruning the change data and unit-of-work tables

Use the PRUNE command to start pruning the CD and UOW tables.

This command prunes tables once.

>>-F--jobname--,PRUNE------------------------------------------><
 

The Capture program issues the message ASN0124I when the command is successfully queued.

During pruning, if you stop or suspend the Capture program, pruning does not resume after you enter the RESUME command. You must enter the PRUNE command again to resume pruning.

Displaying captured log progress

Use the GETLSEQ command to provide the timestamp and current log sequence number. You can use this number to determine how far the Capture program has read the DB2 log.

>>-F--jobname--,GETLSEQ----------------------------------------><
 

The Capture program issues the message ASN0125I indicating when the current log sequence number is successfully processed.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]