About this task
Once you have defined the CDC environment, you can create a Job in Talend Studio using a CDC AS/400 component, in order to extract the changes made to the data in the source system.
For more information regarding the properties and the parameters of the tAS400CDC component, see tAS400CDC .
If you want to use CDC with an AS/400 database, proceed as follows:
Drop tAS400CDC and tLogRow from the Palette
onto the design workspace, and link the two components using a Row Main connection.
Double-click on tAS400CDC to display its
- Select Repository from the Property type drop-down list and click on [...] to fetch the schema which corresponds to your CDC connection. The fields which follow are automatically filled in with the information required to connect to the CDC database.
- Select Repository from the Schema drop-down list and click on [...] to fetch the schema which corresponds to the AS/400 table to be monitored.
- In the Table Name field, enter the name of the source table monitored by CDC, here CUSTOMERS.
- In the Source Library field, enter the name of the source library. By default, this is the same name of the source database.
- In the Subscriber field, enter the name of the subscriber who will extract the modified data. By default, the subscriber is named APP1.
- In the Events to catch field, select the check box which corresponds to the event(s) to be caught.
From your AS/400 system,
CHGJRN JRN(<Source_library_name>/<Source_table_name>) JRNRCV(*GEN)Alternatively, in the Advanced settings view, select the Customize FTP command check box and enter
<CDC_library_name>/RUNCDC FILE(<Source_library_name>/<Source_table_name>) LIBOUT(<CDC_library_name>) MODE(*DETACHED) MBROPT(*ADD) DTCHJRN(*YES)This command allows tAS400CDC to detach the older receiver from the journal and create and attach the newer receiver to that journal.
- Save the Job and press F6 to run it.
In the console, you can read the output results which correspond to what is displayed in the View All Changes dialog box.