IBM Books

Replication Guide and Reference


Operating Capture for AS/400

The replication administrator user ID and users granted *CAPTURE authority can use the commands in this section to perform the following Capture for AS/400 tasks:

This section also describes how the Capture program handles warm and cold starts, in Warm and cold starts.

Starting Capture for AS/400

Use the Start DPR Capture (STRDPRCAP) command to start capturing changes to AS/400 database tables. Because this command processes all replication sources in the register table, make sure that the user running this command has the proper authority.

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

>>-STRDPRCAP----+--------------------------+-------------------->
                |           .-*YES--.      |
                '-RESTART(--+-*NO---+---)--'
 
>-----+---------------------------------------------------+----->
      |        .-*LIBL/QZSNDPR---------------------.      |
      '-JOBD(--+-library-name/job-description-name-+---)--'
 
>-----+----------------------+---+-----------------------+------>
      |          .-1--.      |   |        .-120---.      |
      '-DPRVSN(--+-5--+---)--'   '-WAIT(--+-value-+---)--'
 
>-----+--------------------------------------------------+------>
      |            .-*DPRVSN-------.   .-*IMMED---.      |
      '-CLNUPITV(--+-*GLOBAL-------+---+-*DELAYED-+---)--'
                   '-hours-to-wait-'   '-*NO------'
 
>-----+-------------------------------------------------+------><
      |       .-*ALL-----------------------------.      |
      |       |  .-----------------------------. |      |
      |       |  V                             | |      |
      '-JRN(--+----library-name/journal-name---+-+---)--'
 

Table 20. STRDPRCAP Command Parameter Definitions for AS/400
Parameter Definition and Prompts
RESTART Specifies how the Capture program handles warm and cold starts.

*YES  (default) 
The Capture program continues processing the changes from the point where it was when it ended previously. This is also known as a warm start and is the normal mode of operation.

*NO
The Capture program removes all information from the CD tables. The Capture program also removes all information from the UOW table when you specify JRN(*ALL).

All subscriptions for affected source tables are full refreshed before change capturing resumes. This process is also known as a cold start.

At times you might want to cold start a subset of sources. By specifying RESTART(*NO) and JRN(library-name/journal-name), you can cold start the Capture program for specified journals.

When you cold start a subset of sources, the information in the UOW table is not removed. When you use the STRDPRCAP command to cold start a subset of sources, you can end the Capture program after about 15 minutes and warm start it again (this time, starting all the replication sources).

JOBD Specifies the name of the job description to use when submitting the Capture program.

*LIBL/QZSNDPR  (default) 
Specifies the default job description provided with DPROPR/400.

library-name/job-description-name
Represents the name of the job description used for the Capture program.
DPRVSN Specifies the version of the Capture program to start. You can specify one or both of the version levels.

1  (default) 
Start Version 1 of the Capture program.

5
Start Version 5 of the Capture program.
WAIT Specifies the maximum number of seconds to wait before the Capture program checks its status. You can use this value to tune the responsiveness of the Capture program. A low value reduces the time that the Capture program takes before ending or initializing, but can have a negative effect on system performance. A higher value increases the time that the Capture program takes before ending or initializing, but can improve system performance. A value that is too high can result in decreased responsiveness while the Capture program is performing periodic processing. The amount of the decrease in responsiveness depends on the amount of change activity to source tables and the amount of other work occurring on the system.

120  (default) 
The Capture program waits 120 seconds.

value
The maximum number of seconds that the Capture program waits. You can specify from 60 to 6000 seconds.
CLNUPITV Specifies the maximum amount of time before the Capture program prunes old records from the CD tables and the UOW table, if it exists. This parameter works in conjunction with the RETAIN parameter on the CHGDPRCAPA command.

*DPRVSN  (default) 
Specifies the interval. The value is *GLOBAL.

*GLOBAL
Specifies the interval as the same value as that of the PRUNE_INTERVAL column of the tuning parameters table. You can change this value by using the CLNUPITV parameter on the CHGDPRCAPA command.

hours-to-wait
Specifies the interval as a specific number of hours.

*IMMED  (default) 
Specifies to prune old records at the beginning of the specified interval (or immediately), and at each interval thereafter.

*DELAYED
Specifies that the Capture program prune old records at the end of the specified interval, and at each interval thereafter.

*NO
Specifies that the Capture program not prune records.
JRN Specifies a subset of up to 50 journals that you want the Capture program to work with. The Capture program will start processing all the source tables that are currently journaled to this journal.

*ALL
Specifies that the Capture program will start working with all of the journals that have any source tables journaled to them.

library-name/journal-name
Represents the qualified name of the journal that you want the Capture program to work with.

You can run the STRDPRCAP command manually, or you can automatically run the command as a part of the initial program load (IPL startup program). For information on including the STRDPRCAP command in a startup program, see OS/400 Work Management V4R3, SC41-5306.

If the job description specified with the JOBD parameter uses job queue QDPR/QZSNDPR, and the DPROPR/400 subsystem is not active, the STRDPRCAP command starts the subsystem. If the job description is defined to use a different job queue and subsystem, you must start this subsystem manually with the Start Subsystem (STRSBS) command either before or after running the STRDPRCAP command:

STRSBS QDPR/QZSNDPR
 

You can set up the system to start the subsystem automatically by adding the STRSBS command to the program that is referred to in the QSTRUPPGM system value on your system.

Scheduling Capture for AS/400

Use the SBMJOB command to schedule the start of the Capture program on AS/400:

SBMJOB CMD('STRDPRCAP...') SCDDATE(...) SCDTIME(...)
 

Stopping Capture for AS/400

Use the End DPR Capture (ENDDPRCAP) command to end the Capture program.

Use this command to end the Capture program before shutting down the system. You might also want to end the program during periods of peak system use to increase the performance of other programs that run on the system.

>>-ENDDPRCAP----+----------------------------+------------------>
                |          .-*CNTRLD--.      |
                '-OPTION(--+-*IMMED---+---)--'
 
>-----+----------------------+---------------------------------><
      |          .-1--.      |
      '-DPRVSN(--+-5--+---)--'
 

Table 21. ENDDPRCAP Command Parameter Definitions for AS/400
Parameter Definition and Prompts
OPTION Specifies how to end the Capture program.

*CNTRLD  (default) 
Specifies that the Capture program complete all tasks and then end normally.

The ENDDPRCAP command might take longer when you specify the *CNTRLD option because the Capture program completes all of its subordinate processes before ending.

*IMMED
Specifies that the Capture program complete all tasks with the ENDJOB OPTION(*IMMED) command and end normally.
DPRVSN Specifies the version of the Capture program to end. You can specify one or both of the version levels.

1  (default) 
Specifies Version 1 of DPROPR/400.

5
Specifies Version 5 of DPROPR/400.

If you use the ENDJOB command, temporary objects might be left in the QDPR library. These objects have the types *DTAQ and *USRSPC, and are named QDPRnnnnnn, where nnnnnn is the job number of the job that used them. You can delete these objects when the job that used them (identified by the job number in the object name) is not active.

If the job QDPRCTL5 does not end long after issuing this command, use the ENDJOB command with *IMMED option to end this job and all the journal jobs running in the DPROPR/400 subsystem. Do not end Apply jobs running in the same subsystem if you want to end only the Capture program.

In rare cases when the job QDPRCTL5 ends abnormally, the journal jobs created by QDPRCTL5 might still be left running. The only way to end these jobs is to use the ENDJOB command with either the *IMMED or *CNTRLD option.

Reinitializing Capture for AS/400

The Initialize DPR Capture (INZDPRCAP) command initializes the Capture program by directing the Capture program to work with an updated list of source tables.

Source tables under the control of the program can change while the Capture program is running. Use the INZDPRCAP command to ensure that the Capture program processes the most up-to-date replication sources.

If you change the values of the tuning parameters while the Capture program is running, enter the INZDPRCAP command to reinitialize the program using these values.

The Capture program must be running before you run this command.

>>-INZDPRCAP----+----------------------+------------------------>
                |          .-1--.      |
                '-DPRVSN(--+-5--+---)--'
 
>-----+-------------------------------------------------+------><
      |       .-*ALL-----------------------------.      |
      |       |  .-----------------------------. |      |
      |       |  V                             | |      |
      '-JRN(--+----library-name/journal-name---+-+---)--'
 

Table 22. INZDRCAP Command Parameter Definitions for AS/400
Parameter Definition and Prompts
DPRVSN Specifies the version of the Capture program to initialize. You can specify one or both of the version levels.

1  (default) 
Specifies Version 1 of DPROPR/400.

5
Specifies Version 5 of DPROPR/400.
JRN Specifies a subset of up to 50 journals that you want the Capture program to work with. The Capture program will start processing all the source tables that are currently journaled to this journal.

*ALL  (default) 
Specifies that the Capture program works with all the journals.

library-name/journal-name
Specifies the qualified name of the journal that you want the Capture program to work with.

Pruning the change data and unit-of-work tables

The CLNUPITV parameter on the STRDPRCAP command specifies the maximum number of hours that the Capture program waits before pruning old records from the CD tables and the UOW table. For more information about the CLNUPITV parameter, see Starting Capture for AS/400.

Warm and cold starts

The value of the RESTART parameter on the STRDPRCAP command controls how the Capture program handles warm and cold starts.

Warm start process

Warm start information is saved in most cases. Occasionally, warm start information is not saved. In this case, the Capture program uses the CD tables, UOW table, or the pruning control table to resynchronize to the time that it was stopped.

Automatic cold starts

Sometimes the Capture program automatically switches to a cold start, even if you specified a warm start. On AS/400 systems, cold starts work on a journal-by-journal basis. So, for example, if a journal exceeds the lag limit, all replication sources using that journal are cold-started, whereas replication sources using a different journal are not cold started.

For more information about how the Capture program processes different journal entry types, see Table 23.


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

[ DB2 List of Books | Search the DB2 Books ]