The WRITE_JOURNAL_DATA call

WRITE_JOURNAL_DATA writes a single journal record to the journal specified in the journal model definition that matches the journal name (either a journal on an MVS system logger log stream, an SMF data set, or no record is written where DUMMY is defined in the definition).

WRITE_JOURNAL DATA

DFHJCJCX [CALL,]
      [CLEAR,]
      [IN,
      FUNCTION(WRITE_JOURNAL_DATA),
      FROM(block-descriptor),
      JOURNALNAME(name8 | string | 'string' ) |
      JOURNAL_RECORD_ID(name2 | string | 'string'),
      WAIT(YES|NO),
      [RECORD_PREFIX(block-descriptor),]]
      [OUT,
      RESPONSE(name1 | *),
      REASON(name1 | *)]

This command is threadsafe.

Important

There is a restriction in using the XPI early during initialization. Do not start exit programs that use the XPI functions TRANSACTION_DUMP, WRITE_JOURNAL_DATA, MONITOR, and INQUIRE_MONITOR_DATA until the second phase of the PLTPI. For further information about the PLTPI, refer to Writing initialization and shutdown programs.

FROM(block-descriptor)
specifies the address and the length of the journal record.

The block-descriptor comprises 8 bytes of data. The first 4 bytes hold the address of the data to be written. The second 4 bytes hold the length of the data. The block-descriptor is moved by the DFHJCJCX macro call to the location JCJC_FROM, which is mapped by the DFHJCJCY DSECT.

JOURNALNAME(name8 | string | "string")
specifies the name of the CICS® journal or log to which the FROM data is to be written.
JOURNAL_RECORD_ID(name2 | string | "string")
specifies a 2-character value to be written to the journal record to identify its origin.
name2
The name of a 2-byte location
string
A character string that is limited to a length of 2 in the generated code
"string"
A character string enclosed in quotation marks, limited to a length of 2 in the generated code.
RECORD_PREFIX(block-descriptor)
specifies the optional user prefix.
WAIT(YES|NO)
specifies whether CICS is to wait until the record is written to the journal or log before returning control to the exit program.

RESPONSE and REASON values for WRITE_JOURNAL_DATA

RESPONSE REASON
OK None
EXCEPTION IO_ERROR
  JOURNAL_NOT_FOUND
  JOURNAL_NOT_OPEN
  LENGTH_ERROR
  STATUS_ERROR
DISASTER None
INVALID None
KERNERROR None
PURGED None
Note: For more detail, refer to the explanation of RESPONSE and REASON in Making an XPI call.