Reverse-engineer an IBM DB2400 Model

6 Product TitleBookTitle as a Variable See Chapter Working with Changed Data Capture of the Oracle Fusion Middleware Developers Guide for Oracle Data Integrator for details on how to set up journalizing and how to use captured changes.

14.6.2 Setting up Log-Based CDC

This method is set up with the JKM DB2400 Journal Simple and used by the LKM DB2400 Journal to SQL. It uses also an RPG program to retrieve the journal content. 14.6.2.1 How does it work? A iSeries transaction journal contains the entire history of the data changes for a given period. It is handled by the iSeries system for tables that are journaled. A journaled table is either a table from a collection, or a table for which a journal receiver and a journal have been created and journaling started. Reading the transaction journal is performed by the a journal retriever CDCRTVJRN RPG program provided with Oracle Data Integrator. This program loads on demand the tables of the Oracle Data Integrator CDC infrastructure J tables with the contents from the transaction journal. This program can be either scheduled on the iSeries system or called by the KMs through a stored procedure also called CDCRTVJRN. This stored procedure is automatically created by the JKM DB2400 Journal Simple and invoked by the LKM DB2400 Journal to SQL when data extraction is needed.

14.6.2.2 CDCRTVJRN Program Details

This program connects to the native iSeries journal for a given table, and captures changed data information into the Oracle Data Integrator Journal J. The program works as follows: 1. Journalized table attributes retrieval: a. Table attributes retrieval: PK columns, J table name, last journal reading date. b. Attributes enrichment short names, record size, etc. using the QSYS.QADBXREF system table. c. Location of the iSeries journal using the QADBRTVFD API. 2. PK columns information retrieval: a. PK columns attributes short name, data types etc. using the QSYS.QADBIFLD system table. b. Attributes enrichment real physical length using the QUSLFLD API. c. Data preprocessing RPG to SQL datatype conversion for the primary key columns. 3. Extraction the native journal information into the J table: Table 14–2 IBM DB2 for iSeries Journalizing Knowledge Modules KM Notes JKM DB2 400 Consistent Creates the journalizing infrastructure for consistent journalizing on IBM DB2 for iSeries tables using triggers. JKM DB2 400 Simple Creates the journalizing infrastructure for simple journalizing on IBM DB2 for iSeries tables using triggers.