The administrator can use the commands in this section to operate Capture for VSE.
This section explains how to perform the following Capture for VSE tasks:
Before starting the Capture program, make sure you complete the following post-installation tasks:
The ASNS51CD job control member contains the name of the messages file used. The default is American English. Modify ASNS51CD to issue messages in a different language. See the Capture program directory for a list of supported languages.
After you start the Capture program, it runs continuously until you stop it or it detects an error.
To start the Capture program:
Start it in a partition like a batch job. Sample job control member ASNS51BD provides an example of how to start the Capture program. You can specify ASNCCP invocation parameters in the PARM field, in the order shown, separated by one or more blanks:
Starting the Capture program >>-//--EXEC--PGM=ASNCCP--,PARM=--'----+--------+---+---------+--> +-WARM---+ +-PRUNE---+ +-COLD---+ '-NOPRUNE-' '-WARMNS-' >-----+--------+---+---------+---| Group 1 |--'---------------->< +-TERM---+ +-TRACE---+ '-NOTERM-' '-NOTRACE-' Group 1 |---USERID=--auth_name/password--+------------------------+-----| '-Dbname=--databasename--'
Table 17 defines the optional parameters.
Table 17. ASNCCP Command Parameter Definitions for VSE
|
---|
|
|
|
|
|
Stopping the Capture program >>-MSG--partition,DATA=STOP------------------------------------><
where partition represents the partition that is running Capture for VSE.
Use the STOP command to stop the Capture program gracefully and commit the log records that it processed up to that point.
STOP should be issued before:
If you stop the Capture program, the Capture program shuts itself down and issues an informational message. If it detects an error, the program shuts itself down after cleaning up the data in the affected tables so that the data will not be used. Staging tables are pruned when it is appropriate. In the case of abnormal termination, you must initiate a cold start because the warm start information could not be saved.
Capture for VSE issues informational or error messages to the console.
In some situations, you might want to trigger the stop of the Capture program. For example, you might want to stop it at a specific time, or after all transactions for a particular application have been committed. The simplest way to set up this trigger is to create a table (or use an existing table), define it as a replication source, and identify a particular column whose update, when captured, triggers shutdown.
To stop the Capture program with a trigger:
Use the following example as a guideline.
When your application encounters STOPCAP in the CD table, it should issue the command to stop the Capture program.
Suspending the Capture program >>-MSG--partition,DATA=SUSPEND---------------------------------><
where partition represents the partition that is running Capture for VSE.
Use the SUSPEND command to suspend the Capture program until you issue the RESUME command.
You can use this command to suspend the Capture program to improve performance for operational transactions during peak periods without destroying the Capture for VSE program run environment.
Resuming the Capture program >>-MSG--partition,DATA=RESUME----------------------------------><
where partition represents the partition that is running Capture for VSE.
Use the RESUME command to resume the suspended Capture program.
You can use this command to resume the Capture program if you suspended it with the SUSPEND command.
Reinitializing the Capture program >>-MSG--partition,DATA=REINIT----------------------------------><
where partition represents the partition that is running Capture for VSE.
Use the REINIT command to reinitialize the Capture program.
Use the REINIT command to begin to capture changes from new source tables if you add a new replication source with the Control Center while the Capture program is running. This command ensures that the Capture program recognizes the new replication sources in the register table. To allow the new replication source to be visible to the Capture program, you must issue a REINIT command. The REINIT command tells the Capture program to obtain newly added replication sources from the register table (ASN.IBMSNAP_REGISTER).
REINIT also rereads the tuning parameters table (ASN.IBMSNAP_CCPARMS) for any changes made to the tuning parameters.
Attention: Do not use REINIT 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 use warm start (WARM or WARMNS).
Pruning the Capture program >>-MSG--partition,DATA=PRUNE-----------------------------------><
where partition represents the partition that is running Capture for VSE.
Use the PRUNE command to initiate the pruning of the CD and UOW (UOW) tables, if you used the NOPRUNE invocation parameter to disable pruning when you started the Capture program.
This command prunes tables once. 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.
Getting the Log >>-MSG--partition,DATA=GETLSEQ---------------------------------><
where partition represents the partition that is running Capture for VSE.
Use the GETLSEQ command to provide the timestamp and current log sequence number.
Use the GETLSEQ command to determine how far the Capture program has read the DB2 log.