Create unique journals¶
Instead of letting the Capture Agent create journals and receivers (autojournaling), you can create your own journals, journal receivers and receiver libraries, to control their security and where they're stored.
- One journal can serve many physical files.
- Don't use the names
QSQJRNandQSQJRNnnnn: IBM i uses them for the journals and receivers it creates with the SQL statementsCREATE SCHEMAandCREATE COLLECTION.
Example¶
Create a journal MYLIB/MYJRN with the receiver MYLIB1/MYRCV0001, and journal the physical file MYLIB/MYFILE to
it with before and after images:
-
Create the journal receiver:
CRTJRNRCV JRNRCV(MYLIB1/MYRCV0001) TEXT('receiver for physical files') -
Create the journal:
CRTJRN JRN(MYLIB/MYJRN) JRNRCV(MYLIB1/MYRCV0001) RCVSIZOPT(*MAXOPT2 *RMVINTENT) TEXT('journal for physical files') -
Start journaling the physical file:
STRJRNPF FILE(MYLIB/MYFILE) JRN(MYLIB/MYJRN) IMAGES(*BOTH)
The agent's own journals use RCVSIZOPT(*MAXOPT3 *RMVINTENT), MNGRCV(*SYSTEM) and DLTRCV(*YES), and it
journals files with OMTJRNE(*OPNCLO) (see Autojournaling).
Placement¶
- Journal: in the same library as its files, or at least in the same auxiliary storage pool (ASP).
- Journal receivers: consider a receiver library in a separate ASP, for performance and recovery.
Stop journaling¶
ENDJRNPF FILE(MYLIB/MYFILE)
When no file is journaled to it any more, you can delete the journal and its receivers.