Replication Extract processing flow

The following figure shows the processing flow between DB2, Replication Extract, LTM for MVS, and Replication Server:

Figure 1-2: Replication Extract processing flow

The processing flow for Replication Extract includes the following actions:

  1. The MVS START command, which you issue from the MVS console, starts the LTM for MVS started task. (Replication Agent can also be started as a batch job.)

    1. LTM for MVS processes the configuration file and retrieves information about Replication Server, Replication Extract, user exits, defaults, DB2, traces, and DB2 subsystems.

    2. LTM for MVS opens a connection to Replication Server.

      If the connection to Replication Server fails, LTM for MVS retries the connection (according to the value of the retry and Maximum_connect_retries configuration parameters).

  2. LTM for z/OS queries the Replication Definitions if configured to do so, and starts the Rep Server transmission thread using the z/OS ATTACH command.

  3. Replication Extract connects to the DB2 subsystem using the DB2 CONNECT command. The DB2 subsystem must be active for the entire time the Replication Agent started task is active.

  4. Replication Extract queries the LTMOBJECTS system table to identify the tables marked for replication.

  5. Replication Extract queries the DB2 catalog to retrieve the definitions of all the tables recorded in the LTMOBJECTS table. These definitions are required to format the changes described in the DB2 log.

  6. Replication Extract queries LTM for MVS for the origin queue ID (QID) of the last update that was successfully received by Replication Server, and writes a copy of the QID to the hlq.TRUNCPT data set.

    This QID is called the LTM Locator, and is stored in the Replication Server database, in the rs_locater table. From this QID, Replication Extract derives the point within the log from which processing is to resume.

    If the QID that LTM for MVS passes to Replication Extract and the QID in the TRUNCPT data set contain all binary zeros, Replication Extract begins processing from the end of the active log.

  7. Replication Extract resumes processing at the point derived from the LTM Locator and begins scanning the log (or logs, if Replication Agent is running in data-sharing mode) for changes to DB2 tables.

  8. Using the log records that describe inserts, updates, and deletes to primary tables, Replication Extract constructs a full-row “after” image for inserts, a full-row “before” image for deletes, and full “before” and “after” images for updates for each affected row.

    The individual column values are converted from DB2 internal format to their external format. Replication Extract then passes the converted transaction operation information to LTM for MVS.