Table of Contents

Search

  1. Preface
  2. Part 1: Introduction
  3. Part 2: PowerExchange Client for PowerCenter (PWXPC)
  4. Part 3: PowerExchange ODBC
  5. Appendix A: PowerExchange Interfaces for PowerCenter Tips
  6. Appendix B: Datatypes and Code Pages
  7. Appendix C: PowerExchange Interfaces for PowerCenter Troubleshooting

PowerExchange Interfaces for PowerCenter

PowerExchange Interfaces for PowerCenter

Adding a Source to a Session - Example

Adding a Source to a Session - Example

In this example, a new source (RRTB_SRC_004) is added to an existing CDC session containing three sources. The restart points for the existing sources are maintained. DTLUAPPL is used to generate a restart token representing the current end-of-log in the change stream.
To add a new source to an existing session - example:
  1. Stop the workflow by issuing the Stop command in Workflow Monitor.
  2. After the workflow stops, use the Workflow Monitor and issue the Recover Task command from Workflow Monitor to run a recovery session. PWXPC writes the following messages in the session log:
    PWXPC_12060 [INFO] [CDCRestart] =============================== Session restart information: =============================== Extraction Map Name Restart Token 1 Restart Token 2 Source d1dsn7.rrtb0002_RRTB_SRC_002 000000AD220F00000000000000AD220F0000000000000000 C1E4E2D34040000000AD0D9C00000000 GMD storage d1dsn7.rrtb0001_RRTB_SRC_001 000000AD220F00000000000000AD220F0000000000000000 C1E4E2D34040000000AD0D9C00000000 GMD storage d1dsn7.rrtb0003_RRTB_SRC_003 000000AD220F00000000000000AD220F0000000000000000 C1E4E2D34040000000AD0D9C00000000 GMD storage
    PWXPC places the restart tokens in the restart token file specified in the CDC application connection.
  3. Make any necessary changes to the mapping, session, and workflow to add the new source, RRTB_SRC_004.
  4. Run DTLUAPPL with RSTTKN GENERATE to generate restart tokens for the current end-of-log. Use the following DTLUAPPL control cards to do this:
    mod APPL dummy DSN7 rsttkn generate mod rsttkn rrtb004 end appl dummy print appl dummy
    The PRINT command produces the following output:
    Registration name=<rrtb004.1> tag=<DB2DSN7rrtb0041> Sequence=<00000DBF240A0000000000000DBF240A00000000> Restart =<C1E4E2D3404000000DBF238200000000>
    Add eight zeroes to the end of the
    Sequence=
    value to create the restart token file value.
  5. Update the restart token file to add the new source and its tokens. The updated file looks as follows:
    <!-- existing sources d1dsn7.rrtb0001_RRTB_SRC_001=000000AD220F00000000000000AD220F0000000000000000 d1dsn7.rrtb0001_RRTB_SRC_001=C1E4E2D34040000000AD0D9C00000000 d1dsn7.rrtb0002_RRTB_SRC_002=000000AD220F00000000000000AD220F0000000000000000 d1dsn7.rrtb0002_RRTB_SRC_002=C1E4E2D34040000000AD0D9C00000000 d1dsn7.rrtb0003_RRTB_SRC_003=000000AD220F00000000000000AD220F0000000000000000 d1dsn7.rrtb0003_RRTB_SRC_003=C1E4E2D34040000000AD0D9C00000000 <!-- new source d1dsn7.rrtb0004_RRTB_SRC_004=00000DBF240A0000000000000DBF240A0000000000000000 d1dsn7.rrtb0004_RRTB_SRC_004=C1E4E2D3404000000DBF238200000000
  6. Cold start the session.
    PWXPC passes these restart tokens to PowerExchange to recommence extracting changes from the change stream.
    This restart point is earlier than the one just generated for the new source. The new source does not receive any changes until the first change following its restart point is encountered.

0 COMMENTS

We’d like to hear from you!