I was asked this excellent question, and a quick search in the documentation showed there is a section in the documentation How to balance loads on page sets. Great – this worked a treat – for user queues, but there are a few additional things you need to consider. You also need to be careful when moving system queues.
Moving application queues.
Once you have moved the queues, you should backup the definitions so if you have to recreate the queue manager, you have a copy of the correct definitions you can use.
You need to update your central repository with the new storage class, and the updated definition for the queues and storage class. This is for when you deploy a new queue manager, it picks up the correct definitions.
Moving system queues.
This is the same as for application queues, but you have to do more.
Many people use the CSQINP1 and CSQINP2 data sets provided by the queue manager so they are executed at startup. This is what happens if you use the default QMGR JCL. If you move the SYSTEM.* queues you will need to make a copy of the datasets, make changes to the data sets, so the objects have the correct storage class, and then change the queue manager job to point to the new data sets. Alternatively create a file with the DEFINE QL.. objects you have changed, and have this member first in the list. This file would be executed first. If the objects do not exist, they would be created.
Note: If definitions have DEFINE … REPLACE the definition will override any existing definition.
SYSTEM.COMMAND.INPUT queue
You will not be able to move SYSTEM.COMMAND.INPUT using commands in CSQUTIL, as the command processor reads from this queue. You need to
+cpf alter ql(SYSTEM.COMMAND.INPUT) get(disabled) put(disabled)
This will stop the command processor.
Use commands from the operator console to move it to the new page set
Once you have moved the queue use
+cpf start cmdserv
to restart the command server.
If you want to use SYSTEM.* objects used by the CHINIT you will need to stop the CHINIT for the duration of the moves.
Other system queues
You should also review any model queues, for example SYSTEM.CLUSTER.TRANSMIT.MODEL.QUEUE, and SYSTEM.COMMAND.REPLY.MODEL, so any future queues are created on the correct page set.
Someone pointed out that they were not able to move SYSTEM.PENDING.DATA.QUEUE because a system thread had it open. The altered the queue to get(disabled), the system thread closed the queue, and so they were able to move it.
When to do this?
You may want to schedule an outage while moving queues around, especially SYSTEM.* queues. The moves should be very quick (unless you have deep queues). The other tasks may take longer to do.
One thought on “How to move a queue from one page set to another page set on z/OS?”