About this task
You must specify the table to which the subscriber wants to subscribe and then activate the subscription.
Right-click the schema that corresponds to the source table and select
Add CDC. The
[Create Subscriber and Execute SQL Script] dialog box
displays. The long name and the short name of the source table are both
displayed in this dialog box.
Warning: The source table to be monitored should have a primary key so that the CDC system can identify the lines on which changes have been done. You cannot set up a CDC environment if the schema of your source table does not have a primary key.In this example, since the long name CUSTOMERS does not exceed 10 characters, the short name reads the same as the long name.Note that if you are using a source table retrieved in one of the 5.4.1 or earlier versions of the Studio, only its long name has been retrieved. Then you have to retrieve this table again from the current Studio.
- In the Subscriber Name field, enter the name you want to give the subscriber. By default, the subscriber name is APP1.
Click Execute and then Close.
In the CDC Foundation folder, the change table schema and the associated view appear.
From your AS/400 system:
Create a new receiver:
Create a new journal and attach the receiver created in the previous
For the file to be monitored, start journaling changes into the journal
created in the previous step:
STRJRNPF FILE(<source_library_name>/<file_to_be_monitored)JRN(<source_library_name>/<journal_name) IMAGES(*BOTH)
- Create a new receiver:
To view any changes made to the data, right-click the relevant table
in the Table schemas folder and select
View All Changes to open the
relevant dialog box.
- Click Finish to close the dialog box.