Message queue data set allocation in DB/DC and DCCTL environments
The amount of DASD space allocated to the message queue data sets depends on how many transaction codes and logical terminal names you specify during system definition, and how many short and long messages are to be held by the system during any period.
You can change the amount of direct access storage space allocated to the message queue data sets before a cold start of IMS. Reallocation of the message queue data sets with a warm start requires the use of the FORMAT and BUILDQ parameters with either the /NRESTART or /ERESTART command. Allocating less space (than in the previous execution) before an /NRESTART or /ERESTART BUILDQ might cause the restart to abend.
You can allocate up to 10 data sets for the long message queue and 10 data sets for the short message queue. Each data set requires an additional DD statement.
Ensure that all data sets of a given message queue type are the same size. If the data sets have different sizes, the smallest size is used for all. This can reduce the available space of a message queue.
If you change the number of data sets, or if you rename any of the message queue data sets, you must restart the system.
The Queue Manager Concurrent I/O component provides multiple normal short and long message queue data sets. This facility is optional, and you can invoke it by providing 1 - 10 DD cards for the normal short and long message queue data sets.
In order to provide Queue Manager Concurrent I/O:
- IMS initialization allows multiple physical data sets to be viewed as one logical data set.
- You can view both the physical data set and the logical structure.
For single-mode transactions, a message space is available as soon as it is processed by an application program (for example, the program terminates normally or requests the next message).
For multiple-mode transactions, the message spaces are available only after the application program that processes them terminates normally or takes a checkpoint.
For logical terminal messages, a given message space is made available after the successful receipt of this message by the terminal device.
The number of records to be reserved in each data set to allow the system to shut down depends on message throughput and the number of regions scheduled.
Recommendations:
- If you use emergency restart procedures using BLDQ, reallocate logical record size and data set spaces carefully. Allocate enough space to the data set to hold log records relating to message queue activity occurring between checkpoints. The BLDQ procedure always restores the message queue entries to the relative position in the respective queue data sets at the time saved. If the logical record or data set size is decreased, you might be unable to restart in some situations.
- Do not manage the QBLKS, SHMSG, and LGMSG queue data sets with a migration/recall system that might recall the data sets to a volume other than the one to which they were originally allocated. If you do so, IMS might be unable to warm start or emergency start the system.
- Secondary allocation is not allowed for message queue data sets.
The normal short and long message queues allow only one DD card for each.
To prevent message queue overflow due to looping application programs, the Queue Manager and the Queue Space Notification exit routine (DFSQSPC0) monitor the number of buffers assigned to each unit of work (UOW). When a UOW exceeds its buffer limit, the Queue Space Notification exit routine takes action to prevent further inserts by that UOW, and an 'A7' status code is returned to the application program.
Migrating IMS messages to a different release or configuration of IMS
You can use the IBM® IMS Queue Control Facility for z/OS® (QCF) to migrate messages from one release of IMS to another. QCF is also used after a cold start to migrate messages either to a new configuration or after maintenance.
Monitoring and controlling high message queue users with the IBM IMS Queue Control Facility for z/OS
You can monitor and take action to prevent high message queue users. Use the User Queue Space Notification exit routine (IQMRH0 linked as DFSQMRH0) and the QCF ISPF interface. Using this exit routine helps prevent queue usage from reaching critical thresholds.
Related Reading: For more information about the IBM IMS Queue Control Facility for z/OS, see IMS Queue Control Facility for z/OS User's Guide.
Additional restrictions in an XRF environment
Message queue data sets in an XRF environment have two additional restrictions:
- The number of data sets allocated for the short and long message queues must be the same on the primary and the alternate subsystems.
- The names for the message queue data sets must be different on the primary and alternate subsystems. These data sets cannot be shared between subsystems.
Message queue data set secondary allocation
Several factors affect the usage of IMS.QBLKS records. For example, the requirement for multiple temporary destinations when using program isolation can cause an increase in the space requirements. The space requirements for the IMS.QBLKS data set depend on your installation.
The amount of direct access space required for the IMS.SHMSG and IMS.LGMSG data sets is dependent on message throughput. The disk space is reusable as soon as the message to which it was allocated has been processed and it is no longer required for recovery.
Message queue data set space should be allocated in terms of contiguous cylinders for most efficient operation. Secondary allocation is ignored unless the secondary space has been preallocated (that is, multiple volume data set with preallocated space on both volumes). Allocate each message queue data set on a separate direct access device or next to each other, with IMS.QBLKS in the center, on the same direct access device.
Message queue data set allocation restrictions
If emergency restart procedures using BUILDQ are to be used, you must carefully reallocate logical record and data set spaces. The BUILDQ procedure always restores the message queue entries to the relative position in the respective queue data sets they had at the time they were saved. If the logical record or data set size has been decreased, it might be impossible to perform the restart.