How the IBM MQ for z/OS logs are written

Use this topic to understand how IBM MQ processes log file records.

IBM MQ writes each log record to a DASD data set called the active log. When the active log is full, IBM MQ copies its contents to a DASD or tape data set called the archive log. This process is called offloading.

Figure 1 illustrates the process of logging. Log records typically go through the following cycle:
  1. IBM MQ notes changes to data and significant events in recovery log records.
  2. IBM MQ processes recovery log records and breaks them into segments, if necessary.
  3. Log records are placed sequentially in output log buffers, which are formatted as VSAM Controls Intervals (CI). Each log record is identified by a relative byte address in the range zero through 2 64 -1.
  4. The CIs are written to a set of predefined DASD active log data sets, which are used sequentially and recycled.
  5. If archiving is active, as each active log data set becomes full, its contents are automatically offloaded to a new archive log data set.

Figure 1. The logging process


When the active log is written

The in-storage log buffers are written to an active log data set whenever any of the following occur:

  • The log buffers become full.
  • The write threshold is reached (as specified in the CSQ6LOGP macro).
  • Certain significant events occur, such as a commit point, or when an IBM MQ BACKUP CFSTRUCT command is issued.

When the queue manager is initialized, the active log data sets named in the BSDS are dynamically allocated for exclusive use by the queue manager and remain allocated exclusively to IBM MQ until the queue manager terminates.


Dynamically adding log data sets

It is possible to dynamically define new active log data sets while the queue manager is running. This feature alleviates the problem of a queue manager hang when archiving is not able to offload active logs due to a transient problem. See the DEFINE LOG command for more information. Note: To redefine or remove active logs we must terminate and restart the queue manager.


IBM MQ and Storage Management Subsystem

IBM MQ parameters enable you to specify Storage Management Subsystem ( MVS™/DFP SMS) storage classes when allocating IBM MQ archive log data sets dynamically. IBM MQ initiates the archiving of log data sets, but we can use SMS to perform allocation of the archive data set.

Parent topic: Logging in IBM MQ for z/OS


Related reference