Creating Unique Journals

Instead of using SQDR-created journals and receivers, you can create your own unique journals, journal receivers, and journal receiver libraries. This offers more control in configuring access security and location of the objects.

Note that a single journal can be used for multiple physical files. You can use any valid name for the journal and receiver; however, avoid the names QSQJRN and QSQJRNnnnn, as these are the default names used when the OS/400 creates journal and journal receivers via the CREATE SCHEMA or CREATE COLLECTION SQL statements.

The following example illustrates how to create a journal called "MYLIB/MYJRN" and journalreceiver "MYLIB1/MYRCV0001" and how to associate the physical file "MYLIB/MYFILE" with the journal. Often the journal is placed in the same library as the file to be journaled, but if not, both the journal and the file must reside in the same ASP. This requirement does not extend to the journal receiver library; it may be useful to place the journal receiver library in a separate ASP for performance and recovery purposes.

CRTJRNRCV JRNRCV(MYLIB1/MYRCV0001) TEXT('receiver for physical files')

CRTJRN JRN(MYLIB/MYJRN) JRNRCV(MYLIB1/MYRCV0001) RCVSIZOPT(*MAXOPT2 *RMVINTENT) TEXT('journal for physical files')

STRJRNPF FILE(MYLIB/MYFILE) JRN(MYLIB/MYJRN) IMAGES(*BOTH)

To stop journaling, issue the ENDJRNPF command. Once all journaling on the physical files has ended, the previously associated Journal and Journal Receiver(s) may be deleted.