First, create a Journal Receiver and a Journal. In this example, we'll set up to track data changes to a file named CUSTMSTR in library MYLIB. Use the following commands to create these objects:
CRTJRNRCV JRNRCV(MYLIB/CUSTMSTR)
CRTJRN JRN(MYLIB/CUSTMSTR) JRNRCV(MYLIB/CUSTMSTR)
Now, activate tracing on your physical file by processing the following Start Journal Physical File command:
STRJRNPF FILE(MYLIB/CUSTMSTR) JRN(MYLIB/CUSTMSTR) IMAGES(*BOTH)
At this point, the database journal is active for your file and all activity against that file will be tracked and captured in the Journal Receiver.