About this task
To set the connection between CDC and the data:
Right-click the CDC Foundation folder of the data connection
and select Create CDC to open the Create Change Data
Capture dialog box. In this example, this data connection is
In the Create Change Data Capture dialog box, click the
[...] button next to the Set Link
Connection field to select connection to the database that corresponds
to CDC. In this example, select AS400_CDC.
Click Create Subscriber to create the subscribers. Then the
command to be executed is displayed. The following image presents an example of this
In general, this command reads as follows:
open <AS400_server_host> user <Username> <Password> quote rcmd "crtsavf qgpl/instfitcdc" quote rcmd "clrsavf qgpl/instfitcdc" bin cd qgpl put "<Studio_install>\plugins\org.talend.designer.cdc_<version>\resource\fitcdc.savf" instfitcdc quote rcmd "rstlib savlib(fitcdc) dev(*savf) savf(qgpl/instfitcdc) RSTLIB(<CDC_library_name>)" quote rcmd "CHGCMD CMD(<CDC_library_name>/RUNCDC) PGM(<CDC_library_name>/F2CD00) CURLIB(<CDC_library_name>)" quote rcmd "dltf qgpl/instfitcdc" quit
It is automatically executed via FTP by the Studio to install the RUNCDC program, restore the CDC library (the CDC database), and create the TSUBSCRIBERS table which provides information on all tables where CDC has been set up.
The CDC library by default contains the following tables:
- FITAB: will contain the information about the last
executions and receivers used in its TBDT1 field.
- position 1-10: the library of the last receiver of previous run
- position 11-20: the name of the last receiver of previous run
- position 21-40: the last date/time process
- position 41-50: the library of the last receiver of current run
- position 51-60: the name of the last receiver of current run
- FICLH: will contain the RUNCDC command execution logs and the receivers used.
- FICLF: will contain technical logs about the files used.
Both FITAB and FICLH tables provide information on the receivers already used by the RUNCDC program, and can help clean up receivers if needed.
If you extract change data frequently later, there might be an overflow on the field NUM_ORD in the table FITAB when its value reaches 9999999. If it happens or before it happens, you can reset its value by executing the command
Change F2CD65 NUM_ORD in FITAB to 0 (zero)and then remove all records in the table FICLH, FICLF, FITMP, and FIRCV.Note: You may also need to reset the value of the field NUM_ORD after a reboot of your AS/400 system.
- FITAB: will contain the information about the last executions and receivers used in its TBDT1 field.
If you need to manually execute the command, copy the command and click
Skip to close this dialog box. In this situation, the
command is not executed by the Studio and you need to paste or even edit the command
by yourself and execute it in your AS/400 system.
Otherwise, click Execute to directly run the default command in the Studio. Then a step-by-step execution list appears.Note that on the list, you might read an error with number 550 describing issues such as the fact that not all objects have been restored. This could be normal if the library that was not restored has in fact been restored in your AS/400 system. Contact the administrator of your AS/400 system for clarification.
Once done, in the Create Change Data Capture dialog box, click
In the CDC Foundation folder, the CDC database connection appears, along with the subscription table schema.