The administrator can use the commands in this section to perform the following Capture for MVS tasks:
You can submit the commands from TSO or the MVS console.
Before starting the Capture program, make sure you complete the following post-installation tasks:
You can also create these control tables manually by running the DPCNTL.* file from the RUN SQL Files window.
After you start the Capture program, it runs continuously until you stop it or it detects an error.
To start the Capture program:
An example of this line in the invocation JCL is:
//ASNLRNnn EXEC PGM=ASNLRPnn,PARM='DB2_subsys_name NOTERM WARMNS NOPRUNE'where nn is the level of the Capture program, as follows:
Table 9 defines the parameters.
Table 9. ASNLRP Invocation Parameter Definitions for MVS
|
|---|
|
|
|
|
|
Use either the $TA JES2 command or the AT NetView command to start Capture for MVS at a specific time. You must:
>>-F--jobname,STOP---------------------------------------------><
Use the STOP command to stop the Capture program gracefully and commit the log records that it processed up to that point.
Enter this command from TSO or the MVS console before:
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.
>>-F--jobname,SUSPEND------------------------------------------><
Use the SUSPEND command to relinquish MVS 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.
Enter the SUSPEND command from TSO or the MVS console.
Attention: Do not use SUSPEND when canceling a replication source. Instead, stop the Capture program by entering the STOP command.
>>-F--jobname,RESUME-------------------------------------------><
Use the RESUME command to restart the suspended Capture program.
Enter the RESUME command from TSO or the MVS console.
>>-F--jobname,REINIT-------------------------------------------><
Use the REINIT command to have the Capture program reread the ASN.IBMSNAP_REGISTER tables or the ASN.IBMSNAP_CCPPARMS table while it is running. Use this command when you add a new replication source with Control Center while the Capture program is running.
This command ensures that the Capture program recognizes the new replication source. It also rereads the ASN.IBMSNAP_CCPPARMS table 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 the warm start (WARM or WARMNS) option.
Enter the REINIT command from TSO or the MVS console.
>>-F--jobname,PRUNE--------------------------------------------><
Use the PRUNE command to start pruning the change data (CD) table and unit-of-work (UOW) tables if you used the NOPRUNE invocation parameter to disable pruning when you started the Capture program. This command prunes the CD and UOW tables once.
Enter the PRUNE command from TSO or the MVS console. 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.
>>-F--jobname,GETLSEQ------------------------------------------><
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.
Enter the GETLSEQ command from TSO or the MVS console. The Capture program issues the message ASN0125I indicating when the current log sequence number is successfully processed.