Create the default work library if it does not exist yet. You can use, for example, Create in this library an empty save file that has the same name as the SAVF file

8 Product TitleBookTitle as a Variable 5. Upload the local SAVF file on the iSeries system in the library and on top of the file you have just created. Make sure that the upload process is performed in binary mode. An FTP command sequence performing the upload is given below as an example. FTP 192.168.0.13 LCD oracleodisetupmanualcdc-iseries BI CD ODILIB PUT SAVPGM0110 BYE ■ Restore the objects from the save file, using the RSTOBJ command. For example: RSTOBJ OBJALL SAVLIBCDCODIRELE DEVSAVF OBJTYPEALL SAVFODILIBSAVPGM0110 RSTLIBODILIB ■ Check that the objects are correctly restored. The target library should contain a program object called CDCRTVJRN. Use the following command below to view it: WRKOBJ OBJODILIBCDCRTVJRN The CDCRTVJRN Stored Procedure This procedure is used to call the CDCRTVJRN program. It is automatically created by the JKM DB2400 Journal Simple KM when journalizing is started. Journalizing startup is described in the Change Data Capture topic. The syntax for the stored procedure is provided below for reference: create procedure ODILIB.CDCRTVJRN SbsTName char138, Qualified Subscriber Table Name JrnTName char138, Qualified Table Name Subscriber char50 , Subscriber Name LogMessages char1 Create a Log Y - Yes, N - No language rpgle external name ODILIBCDCRTVJRN

14.6.2.4 Using the CDC with the Native Journals

Once the program is installed and the CDC is setup, using the native journals consists in using the LKM DB2400 Journal to SQL to extract journalized data from the iSeries system. The retrieval process is triggered if the RETRIEVE_JOURNAL_ENTRIES option is set to true for the LKM.

14.6.2.5 Problems While Reading Journals

This section list the possibly issues when using this changed data capture method. CDCRTVJRN Program Limits The following limits exist for the CDCRTVJRN program: Note: The stored procedure and the program are installed in a library defined in the Topology as the default work library for this iSeries data server 9 ■ The source table should be journaled and the iSeries journal should be readable by the user specified in the iSeries data server. ■ The source table should have one PK defined in Oracle Data Integrator. ■ The PK declared in Oracle Data Integrator should be in the 4096 first octets of the physical record of the data file. ■ The number of columns in the PK should not exceed 16. ■ The total number of characters of the PK column names added to the number of columns of the PK should not exceed 255. ■ Large object datatypes are not supported in the PK. Only the following SQL types are supported in the PK: SMALLINT, INTEGER, BIGINT, DECIMAL Packed, NUMERIC Zoned, FLOAT, REAL, DOUBLE, CHAR, VARCHAR, CHAR VARYING, DATE, TIME, TIMESTAMP and ROWID. ■ Several instances of CDCRTVJRN should not be started simultaneously on the same system. ■ Reinitializing the sequence number in the iSeries journal may have a critical impact on the program program hangs if the journal entries consumption date SNP_SUBSCRIBERS.JRN_CURFROMDATE is before the sequence initialization date. To work around this problem, you should manually set a later date in SNP_ SUBSCRIBERS.JRN_CURFROMDATE. Troubleshooting the CDCRTVJRN Program The journal reading process can be put in trace mode: ■ either by calling from your query tool the CDCRTVJRN stored procedure with the LogMsg parameter set to Y, ■ or by forcing the CREATE_SPOOL_FILE LKM option to 1 then restarting the interface. The reading process logs are stored in a spool file which can be reviewed using the WRKSPLF command. You can also review the raw contents of the iSeries journal using the DSPJRN command.

14.7 Setting up Data Quality

Oracle Data Integrator provides the generic CKM SQL for checking data integrity against constraints defined in DB2400. See Set up Flow Control and Post-Integration Control in the Oracle Fusion Middleware Developers Guide for Oracle Data Integrator for details. See Chapter 4, Generic SQL for more information.

14.8 Designing an Interface

You can use IBM DB2 for iSeries as a source, staging area or a target of an integration interface. The KM choice for an interface or a check determines the abilities and performance of this interface or check. The recommendations in this section help in the selection of the KM for different situations concerning an IBM DB2 for iSeries data server.