Sending your own journal entries

 

You can use the Send Journal Entry (SNDJRNE) command or the Send Journal Entry (QJOSJRNE) API to add your own entries to a journal. The system places these entries in the journal's attached journal receiver along with the system-created journal entries.

To help identify your entries, you can associate each entry with a particular journaled object. If you use the QJOSJRNE API, you can include the commit cycle identifier with the journal entry and send a larger amount of entry-specific data.

You may add entries to the journal to identify significant events (such as a checkpoint) or to help in the recovery of your applications. On the SNDJRNE command, the data specified on the ENTDTA parameter becomes the Entry-Specific Data field in the journal entry, and the TYPE parameter value becomes the entry type field. On the QJOSJRNE API, you use the entry data parameter to specify the entry-specific data and the journal entry type parameter to specify the entry type. For both the command and API deposits, the entries journal code is 'U'.

The maximum user entry data size for the QJOSJRNE API is 15 MB, which is the maximum journal entry size for a journal that does not have one of the receiver maximums chosen (RCVSIZOPT(*MAXOPT1/*MAXOPT2/*MAXOPT3)). If the length of the entry data is greater than 32KB, then a pointer to the entry data will be returned when retrieving the entry. If the retrieve interface is expecting pointers, the data can be accessed through the pointer returned on the retrieve. Otherwise, the data returned by the retrieve interface will be *POINTER.

The QJOSJRNE API optionally returns the following values in the location specified by the receiver variable:

 

Parent topic:

Managing journals

Related concepts
Planning which objects to journal Journaled changes with trigger programs Journal code descriptions