Table of Contents

Search

  1. Preface
  2. Change Data Capture Introduction
  3. PowerExchange Listener
  4. PowerExchange Condense
  5. DB2 for i5/OS Change Data Capture
  6. Remote Logging of Data
  7. Introduction to Change Data Extraction
  8. Extracting Change Data
  9. Monitoring CDC Sessions
  10. Managing Change Data Extractions
  11. Tuning CDC Sessions
  12. Appendix A: DTL__CAPXTIMESTAMP Time Stamps

CDC Guide for i5/OS

CDC Guide for i5/OS

PowerExchange Journal Exit

PowerExchange Journal Exit

To use the PowerExchange journal exit, specify Y for the AS4JRNEXIT parameter on the AS4J CAPI_CONNECTION statement.
When you install PowerExchange and run the CRTPWXENV command, you must provide the following information:
  • In the JRNEXTSEQ parameter, an exit program number for the DTLRCVRX program
  • In the CONDLIB parameter, a library name for the CONDLIB library
PowerExchange installs the DTLRCVRX exit program in the i5/OS system at the Delete Journal Receiver exit point, QIBM_QJO_DLT_JRNRCV, and uses this program to prevent the deletion of the journal receivers that are currently being processed. Use the following command to display the exit programs installed for the QIBM_QJO_DLT_JRNRCV exit point:
WRKREGINF EXITPNT(QIBM_QJO_DLT_JRNRCV)
The DTLRCVRX exit program, by default, runs under the profile that you use to perform the PowerExchange installation. You can specify a different user profile in the PGMDTA command parameter of the ADDEXITPGM command.
For example:
ADDEXITPGM EXITPNT(QIBM_QJO_DLT_JRNRCV) FORMAT(DRCV0100) PGMNBR(5705) PGM(
CONDLIB
/DTLRCVRX) THDSAFE(*UNKNOWN) MLTTHDACN(*SYSVAL) TEXT('PowerExchange DLTJRNRCV Exit Point') REPLACE(*YES) CRTEXITPNT(*NO) PGMDTA(*JOB 10
MYUSRPRF
)
The underlined values should be the same as those used in the CRTPWXENV command. You can view the current values by displaying exit programs for the exit point QIBM_QJO_DLT_JRNRCV, which is available through the WRKREGINF command.
If you do not specify a value for the PGMDTA parameter, the exit program runs under the user profile QUSER and authority issues might cause run-time errors. The errors should not prevent the deletion of the journal receiver. If the value is changed, use a suitable user profile that has the requisite authority to PowerExchange objects.
PowerExchange also creates a physical file in the CONDLIB library called PWXJRNLCKP, which is used to record the lock records for journal receivers. PowerExchange associates a journal called PWXJRN and journal receivers called PWXJRN
nnnn
with the PWXJRNLCKP file to journal changes made to that file.
If you use the PowerExchange journal exit, PowerExchange performs the following processing:
  • When PowerExchange starts reading a journal receiver, it writes a lock record for that journal receiver in the PWXJRNLCKP file.
  • When PowerExchange switches to the next journal receiver on the chain, PowerExchange writes a lock record for the next journal receiver and deletes the lock record for the previous journal receiver from the lock file.
  • PowerExchange writes lock records for each change data extraction that is processing a journal receiver. As a result, there might be multiple records for a single journal receiver in the PWXJRNLCKP file.
Each lock record in the PWXJRNLCKP file includes information about the journal receiver that is locked, such as the library and journal receiver file names, the job name and number of the task that is processing the journal receiver, and the timestamp for when the journal receiver was locked.
When one of the following events occur, PowerExchange releases the lock on the journal receiver by deleting the lock record for the journal receiver from the PWXJRNLCKP file:
  • PowerExchange reads journal entries that indicate a change of journal receiver has occurred.
  • The PowerExchange Condense job or the real-time extraction mode operation that is reading the change data from the journal receiver ends.
  • The PowerExchange Listener or PowerExchange Condense job that obtained the locks ends normally.
If the PowerExchange job that obtains the lock on the journal receiver abnormally terminates, you must manually remove the records for that job from the PWXJRNLCKP file.
PowerExchange only locks journal receivers that it is currently processing. Because i5/OS prevents deletion of journal receivers that are attached or more current in the receiver chain from those being processed, PowerExchange does not need to lock more current journal receivers in the journal receiver chain.

0 COMMENTS

We’d like to hear from you!