Skip to main content Skip to complementary content

Journalizing AS/400 IBMi database

About this task

The AS/400 IBMi journal is a standard AS/400 IBMi object (*JRN) used to record the modifications made to files. The journal contains the characteristics of the current journalization task. The AS/400 IBMi journal receiver is an AS/400 IBMi component (*JRNRCV) associated with the journal. It contains the data relative to the changes made to the database.

To activate automatic management of the journal receivers by IBMi, assign a maximum size (expressed in kB). When the maximum size is reached, the receiver is detached and a new one is assigned automatically. The Talend Change Data Capture DDJRN command is used to automatically delete the receivers that are no longer used.

Procedure

  1. To activate automatic management of the journal receivers by IBMi, assign a maximum size (expressed in kB). When the maximum size is reached, the receiver is detached and a new one is assigned automatically. The Talend Change Data Capture DDJRN command is used to automatically delete the receivers that are no longer used.
  2. Create the AS/400 IBMi journal receiver, JRNRCV0001, in the BIBJRN library.
    CRTJRNRCV JRNRCV(BIBJRN/RCV0000001)
    Information noteNote: It is recommended to end the journal receiver's name with at least 4 digits (0001) so that IBMi can continue the numbering if the receivers are managed automatically. Talend Change Data Capture uses this function to determine a receiver's position with respect to another receiver. We strongly recommend that you do not change this order by inserting a receiver without a number, or a receiver with a lower number. If, despite these precautions, the order is broken, you can solve the problem by making recoveries from a sequence.
  3. Create the AS/400 IBMi journal:
    CRTJRN JRN(BIBJRN/JOURNAL)
    JRNRCV(BIBJRN/RCV0000001)                
  4. Journalize the AS/400 IBMi file BIBFIC/FIC1:
    STRJRNPF FILE(BIBFIC/FIC1) JRN(BIBJRN/JOURNAL) IMAGES(*BOTH) OMTJRNE(*OPNCLO)
    Information noteWarning: Make sure that the files are journalized with *BOTH images and not *AFTER images, which is the default value proposed.
    You can continue to use a file that is being journalized. However, when you stop journalizing a file (ENDJRNPF command), the file must not be used (you can ensure this by using the WRKOBJLCK command).

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!