You can use journal monitors to define journal, journal codes, and journal entry types to monitor. There is a separate monitor job for each monitor object definition of this event class.
You determine which entries the journal monitor receives from a journal receiver by specifying journal codes and journal entry types. The journal monitor starts at a specified entry in the currently attached journal receiver. The journal monitor receives and processes only the entries that meet your filtering criteria of specified journal codes and journal entry types. When the monitor receives an entry, the condition program runs. The condition program determines if the event program will run.
Journal monitors have a process type parameter that determines whether entries that meet the selection criteria are processed synchronously or asynchronously. In synchronous processing, the monitor calls the condition and event programs and the next journal transaction is not received until the event program completes. In asynchronous processing, a separate job is started to process the message, call the condition and event programs, and update the status of the monitor upon completion. Asynchronous processing allows the monitor to immediately process the next entry without waiting for processing of the previous entry to complete.
A synchronous journal monitor can also specify a retry attempt value. When a retry value is specified, multiple journal entries must meet the monitoring criteria and the condition program will be called each time before the event program is called.
A journal monitor writes an entry to the journal being monitored when the following situation occurs. If you specify the parameter FROMENT2(*LASTPROC) when you start a journal monitor, the monitor starts checking entries at the last sequence number processed. If no additional entries were written to the journal since the monitor processed the last entry, the monitor writes entry U ‘MX’ to the journal.