CL Command Reference - CRTJRN

CL Command List > CRTJRN Reference

Description:

The Create Journal (CRTJRN) command creates a journal as a local journal with the specified attributes, and attaches the specified journal receiver to the journal. Once a journal is created, object changes can be journaled to it or user entries can be sent to it. The journal state of the created journal is *ACTIVE.

Restrictions:

. A journal cannot be created in the library QTEMP. v The receiver specified must be created before issuing this command and it must be empty (that is, the receiver must not have been previously attached to a journal or have been in the process of being attached to a journal).

. This command cannot be used to create a remote journal. See the ADDRMTJRN (Add Remote Journal) command description or the Add Remote Journal (QjoAddRemoteJournal) API in the System API Reference information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.

. If one of the *MAXOPT values from the RCVSIZOPT parameter is not to be in effect for the journal, the maximum threshold value that can be specified for any journal receiver being attached is 1,919,999 kilobytes.

. If the library to contain the journal is on an independent ASP then the journal receiver specified must be located on an independent ASP that is in the same ASP group as the journal¡¯s library. Likewise, if the library to contain the journal is not on an independent ASP, then the journal receiver specified cannot be located on an independent ASP.

. If the library to contain the journal is on an independent ASP then ASP(*LIBASP) must be specified.

. RCVSIZOPT(*MINFIXLEN) and FIXLENDTA cannot be used for the system security audit journal QSYS/QAUDJRN. Journal entries in the security audit journal are required to contain all possible data that could be used for auditing purposes.

. JRNOBJLMT(*MAX10M) is only valid if one of the *MAXOPT values was specified for the RCVSIZOPT parameter.

. JRNOBJLMT(*MAX10M), once specified for a journal, cannot be changed.


Examples:

Example 1: Creating a Journal to Use Auxiliary Storage Pool

CRTJRN JRN(MYLIB/JRNLA) JRNRCV(MYLIB/RCV01) ASP(3)

This command creates a journal named JRNLA in library MYLIB. Storage space for the journal is allocated from user auxiliary storage pool (ASP) 3. Journal receiver RCV01 in library MYLIB is attached to journal JRNLA. The public authority for the journal is taken from the CRTAUT parameter for library MYLIB.



Example 2: Creating a Journal with a Larger Object Limit

CRTJRN JRN(YOURLIB/JRNLB) JRNRCV(YOURLIB/RCV01)
RCVSIZOPT(*MAXOPT3 *RMVINTENT)
JRNOBJLMT(*MAX10M)

This command creates a journal named JRNLB in library YOURLIB that will allow up to 10,000,000 objects to be journaled to it. Journal receiver RCV01 in library YOURLIB is attached to journal JRNLB. The public authority for the journal is taken from the CRTAUT parameter for library YOURLIB. Using the larger journal object limit requires that one of the values of maximum options for the receiver size option parameter be specified. In this case, *MAXOPT3 was chosen for the receiver size option parameter. This will allow the journal receiver to grow to approximately one terabye, the sequence number to reach 18,446,744,073,709,551,600 and a maximum journal entry size of 4,000,000,000 bytes. Entries needed soley for recovery purposes will be removed when they are no longer needed by the system.