migrating queues from non-shared to shared" /> Migrating non-shared queues to shared queues

 

Migrating non-shared queues to shared queues

There are two stages to migrating non-shared queues to shared queues:

 

Migrating the first (or only) queue manager in the queue-sharing group

Figure 43 shows an example job for moving a non-shared queue to a shared queue. Do this for each queue that needs migrating.

Notes:

  1. Messages on shared queues are subject to certain restrictions on the maximum message size, message persistence, and queue index type, so you might not be able to move some non-shared queues to a shared queue.

  2. You must use the correct index type for shared queues. If you migrate a transmission queue to be a shared queue, the index type must be MSGID.

If the queue is empty, or you do not need to keep the messages that are on it, migrating the queue is simpler. Figure 45 shows an example job to use in these circumstances.

Figure 45. Sample job for moving a non-shared queue without messages to a shared queue

//UTILITY  EXEC  PGM=CSQUTIL,PARM=('CSQ1')
//STEPLIB  DD    DSN=thlqual.SCSQANLE,DISP=SHR
//         DD    DSN=thlqual.SCSQAUTH,DISP=SHR
//SYSPRINT DD    SYSOUT=*
//SYSIN    DD    *
COMMAND DDNAME(MOVEQ)
/*
//MOVEQ  DD    *
DELETE QL(TEMP_QUEUE) PURGE
DEFINE QL(TEMP_QUEUE) LIKE(QUEUE_TO_MOVE) PUT(ENABLED) GET(ENABLED)
DELETE QL(QUEUE_TO_MOVE)
DEFINE QL(QUEUE_TO_MOVE) LIKE(TEMP_QUEUE) CFSTRUCT(NEW) QSGDISP(SHARED)
DELETE QL(TEMP_QUEUE)
/*

 

Migrating any other queue managers in the queue-sharing group

  1. For each queue that does not have the same name as an existing shared queue, move the queue as described in Figure 43 or Figure 45.

  2. For queues that have the same name as an existing shared queue, move the messages to the shared queue using the commands shown in Figure 46.
    Figure 46. Moving messages from a non-shared queue to an existing shared queue

    MOVE QLOCAL(QUEUE_TO_MOVE) QSGDISP(QMGR) TOQLOCAL(QUEUE_TO_MOVE)
    DELETE QLOCAL(QUEUE_TO_MOVE) QSGDISP(QMGR)