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.
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
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.
Use the SBMJOB command to schedule the start of the Capture program on AS/400:
SBMJOB CMD('STRDPRCAP...') SCDDATE(...) SCDTIME(...)
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.
|
DPRVSN | Specifies the version of the Capture program to end. You can
specify one or both of the version levels.
|
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.
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.
|
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.
|
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.
The value of the RESTART parameter on the STRDPRCAP command controls how the Capture program handles warm and cold starts.
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.
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.