WAIT JOURNAL

Synchronizes with journal output.

Syntax

SET WAIT JOURNAL

Read syntax diagramSkip visual syntax diagramWAIT JOURNALJFILEID( data-value)REQID( data-value)STARTIO

Condition: INVREQ, IOERR, JIDERR, NOTAUTH, NOTOPEN

 

Description

WAIT JOURNAL synchronizes the task with the output of one or more journal records that have been created but whose output has been deferred; that is, with asynchronous journal output requests.

The journal records that are buffered in the file system might already be written out to auxiliary storage, or the journal record output operation might be in progress. If the output operation has already been completed, control returns immediately to the requesting task; if not, the requesting task waits until the operation has been completed. Output is initiated immediately, whether STARTIO is present or not.

If the requesting program has made a succession of successful asynchronous output requests to the same journal, it is necessary to synchronize on only the last of these requests to ensure that all the journal records have reached auxiliary storage. This can be done either by issuing a stand-alone WAIT JOURNAL command, or by making the last output command itself synchronous (by specifying the WAIT option in the JOURNAL command).

The following example shows how to request synchronization with the output of a journal record:
EXEC CICS WAIT JOURNAL
               JFILEID(4)
               REQID(ENTRYID)

Options

JFILEID(data-value)
Specifies, as a 16-bit binary value in the range 1 through 99, the number that is to be taken as the journal identifier. A Journal Definitions (JD) entry must exist for the number. On other CICS® systems, the value 1 is reserved for the system log; so you are advised to avoid using this number on CICS systems.
REQID(data-value)
Specifies, as a 32-bit binary value, a number that identifies the journal record that has been created but possibly not yet written out to permanent storage.

If REQID is not specified, the task is synchronized with the output of the last record that was created for the journal that is specified by JFILEID.

STARTIO
This option specifies that output of the journal record is to be initiated immediately.

Conditions

INVREQ
  • Occurs if a WAIT JOURNAL command is issued before any JOURNAL command has been issued in the same task.

Default action: Terminates the task abnormally.

IOERR
Occurs if the physical output of a journal record was not accomplished because of an unrecoverable I/O error.

(For information about handling the IOERR condition, see IOERR condition processing.)

Default action: Terminates the task abnormally.

JIDERR
Occurs if the specified journal identifier does not exist in the JD.

Default action: Terminates the task abnormally.

NOTAUTH
Occurs if a resource security check has failed on JFILEID(data-value).

Default action: Terminates the task abnormally.

NOTOPEN
Occurs if the WAIT JOURNAL command cannot be satisfied because the specified journal is not open.

Default action: Terminates the task abnormally.