You are currently on IBM Systems Media’s archival website. Click here to view our new website.

MAINFRAME > Administrator > IMS

Tips for Using IMS Shared Queues


When it comes to high availability for IMS, many customers would naturally consider the IMS shared queues solution. In a shared queues environment, should an IMS system fail, any of the remaining IMS systems can continue processing the transaction workload. Other advantages of shared queues include automatic workload balancing and increased capacity.

Recently some clients in Taiwan with high transaction volume upgraded their IMS systems to use the shared queues solution. This article is to provide some tips for using IMS shared queues based on the experiences we learned from these clients.

Tip 1: Understand the PARLIM Setting of the TRANSACT Macro

IMS applications can be customized for transactions to be processed by multiple regions in paral-lel. The PARLIM value of the TRANSACT macro controls the number of parallel regions.

In a non-shared queues environment, when the number of transactions queued exceeds the PAR-LIM value, IMS will initiate another region to process them. In a shared queues environment, rather than being the transaction queue depth, the PARLIM value is used against a counter that each IMS uses to keep track of the number of successful consecutive Get Unique (GU) calls for the transaction by that IMS system.

A PARLIM value of 0 is the most responsive setting for shared queues because it ensures that message processing regions are scheduled until all messages are processed in the queue or the maximum region value, MAXRGN, is reached. Setting the MAXRGN value helps avoid unnec-essary schedules in the shared queues environment.

Tip 2: Avoid Unnecessary Shared Queues Structure Alters

When IMS runs in a shared queues environment, it stores transaction messages on the coupling facility structure. The structure might be full if the messages arrive faster than the messages can be processed.

The z/OS monitoring capability for a full structure, which has a default threshold of 80 percent, can be used to monitor the queue and resource structures. It issues a highlighted message to warn when a structure is approaching full capacity. If the threshold is reached, z/OS can initiate a structure alter to increase the structure size or change the element-to-entry ratio. A different threshold can be defined with the FULLTHRESHOLD parameter in the coupling facility re-source management (CFRM) policy.

IMS Common Queue Server (CQS) also provides a structure overflow function that automatical-ly warns 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, defined in the CQSSGxxx member of the PROCLIB data set, CQS attempts to make the structure larger by initiating a structure al-ter. If the alter fails, CQS either allocates an overflow structure and moves data objects associat-ed with selected queues to the overflow structure, or rejects data objects from being put on the selected queues. The default overflow threshold is 70 percent. A different CQS threshold can be defined with the OVFLWMAX parameter in the CQSSGxxx member.

If both z/OS CFRM policy FULLTHRESHOLD parameter and IMS CQS OVFLWMAX param-eter are defined, make sure the two parameter values aren’t close to avoid frequent structure al-ters.

Tip 3: Rebuild a Shared Queue Structure, If Needed

If the coupling facility structure is getting too full, you typically want to be notified in advance and rebuild the structure by performing the following steps:

  1. Change the CFRM policy to specify a larger structure size

  2. Use the following MVS command to activate the policy: SETXCF START,POLICY,TYPE=CFRM,POLNAME=newpolicy

  3. Use the following MVS command to rebuild the structure: SETXCF START,REBUILD,STRNAME=structure_name The structure will be rebuilt with the new size specification.

Carson Tsai is a senior IT specialist with IBM.

Rita Shih is an IMS quality analyst with IBM.

Jack Yuan is a senior software engineer for IMS development. He can be contacted at

Yee-Rong Lai is a key information developer for the IMS SOA solution suite at the IBM Silicon Valley lab.

Like what you just read? To receive technical tips and articles directly in your inbox twice per month, sign up for the EXTRA e-newsletter here.



2019 Solutions Edition

A Comprehensive Online Buyer's Guide to Solutions, Services and Education.

Bringing IMS and SOA Together With IMS Connect

New requirements for IMS Connect functionality could make implementing an SOA environment with IMS easier and more flexible.

Celebrating 40 Successful Years

IMS version 10 supports synchronous and asynchronous callout

IBM Systems Magazine Subscribe Box Read Now Link Subscribe Now Link iPad App Google Play Store
Mainframe News Sign Up Today! Past News Letters