CQS structure overflow function

CQS provides a structure overflow function that automatically warns you when a queue structure is approaching full and takes action to prevent a full structure. When the usage of a structure reaches the overflow threshold, CQS attempts to make the structure larger by initiating a structure alter. If the alter fails, CQS either allocates an overflow structure and moves data objects associated with selected queues to the overflow structure (if you define an overflow structure) or rejects data objects from being put on the selected queues. CQS stops all activity against the structure while the queues are being selected.

Definition: The overflow threshold is the percentage of the primary structure that must be in use before CQS goes into overflow mode. The default overflow threshold is 70%, but you can change the default by defining the OVFLWMAX parameter in the CQSSGxxx member of the PROCLIB data set.
Important: Structure overflow is not supported for resource structures.

If CQS does not succeed in altering a structure's size, the structure goes into overflow mode. In overflow mode, CQS selects queues using the most space on the structure as candidates for overflow processing. CQS stops selecting queues when enough queues have been selected to cause the primary structure usage to fall 20% below the overflow threshold. Activity against the structure is temporarily stopped while queues are being selected for overflow. CQS drives the Queue Overflow User-Supplied exit routine with the candidate queue names, which the exit then approves or rejects for overflow processing. Queues that get approved are placed into overflow mode. If an overflow structure is defined, CQS allocates the overflow structure and moves the data objects associated with the approved queues to the overflow structure. If an overflow structure is not defined, CQS rejects CQSPUT requests for the approved queues. Overflow structures can be defined in the CQSSGxxx member of the PROCLIB data set, using the OVFLWSTR parameter.

If an overflow structure is allocated, a queue remains in overflow mode until CQS detects that there are no more entries in the queue. (The queues are scanned every 15 minutes.) After the empty queue is detected, it is removed from overflow mode and returned to normal processing. Because the scan is periodic, empty queues might remain in overflow mode temporarily. When all queues have been removed, CQS exits overflow mode. If no overflow structure is allocated, CQS exits overflow mode when the primary structure usage drops 20% below the overflow threshold.

Remember: Large messages (messages that exceed the size of a queue manager long message record) are put on the shared queue structure in multiple parts. The first part of a message is placed on the transaction or LTERM ready queue. The second and subsequent parts are placed on a secondary queue called the staging queue. When a transaction or LTERM queue is selected for overflow processing, only the first part of any large messages on that queue are moved to the overflow structure. Any parts of a message that are on the staging queue remain on the primary structure. The staging queue is not eligible for overflow processing. You can use the LGMSGSZ parameter to change the size of the queue manager long message record.