Moving Q subscriptions to a different replication queue map

You can move existing Q subscriptions to a new replication queue map so that they use a different send queue and receive queue for data transmission.

About this task

Procedure

Procedure

  1. Optional: If you are using a new replication queue map for the Q subscriptions, create it with the Replication Center or ASNCLP command-line program, specifying the names of the send queue, receive queue, and Q Apply administration queue.
    You can also move the Q subscriptions to an existing queue map.
  2. Stop the send queue that the Q subscriptions are currently using. You can use a signal to the Q Capture program similar to the following example:
    INSERT INTO QASN1.IBMQREP_SIGNAL(SIGNAL_TIME,SIGNAL_TYPE,SIGNAL_SUBTYPE,SIGNAL_INPUT_IN,SIGNAL_STATE) 
    VALUES (CURRENT TIMESTAMP,'CMD','STOPQ','OLDQ;CURRENT_TIMESTAMP;DATA_APPLIED','P');
    The command in this example prompts the Q Capture program to publish all changes up to the current timestamp for send queue OLDQ and wait for Q Apply to acknowledge that all changes from this queue are applied before stopping the send queue.
  3. At the Q Capture server, for each Q subscription that you are moving update the SENDQ column in the IBMQREP_SUBS table with the name of the new send queue:
    UPDATE QASN1.IBMQREP_SUBS SET SENDQ='new_queue_name' WHERE SUBNAME='qsub_name';
  4. At the Q Apply server, for each Q subscription that you are moving update the RECVQ column in the IBMQREP_TARGETS and IBMQREP_TRG_COLS tables with the name of the new receive queue:
    UPDATE ASN.IBMQREP_TARGETS SET RECVQ='new_queue_name' WHERE SUBNAME='qsub_name';
    UPDATE ASN.IBMQREP_TRG_COLS SET RECVQ='new_queue_name' WHERE SUBNAME='qsub_name';
  5. Start the old and new send queues on the Q Capture side:
    INSERT INTO QASN1.IBMQREP_SIGNAL(SIGNAL_TIME,SIGNAL_TYPE,SIGNAL_SUBTYPE,SIGNAL_INPUT_IN,SIGNAL_STATE) 
    VALUES (CURRENT TIMESTAMP,'CMD','STARTQ','OLDQ','P');  
    
    INSERT INTO QASN1.IBMQREP_SIGNAL(SIGNAL_TIME,SIGNAL_TYPE,SIGNAL_SUBTYPE,SIGNAL_INPUT_IN,SIGNAL_STATE) 
    VALUES (CURRENT TIMESTAMP,'CMD','STARTQ','NEWQ','P');  
    
  6. Start the new receive queue on the Q Apply side.
    You can use the MODIFY command:
    F QAPPLY_JOBNAME,STARTQ=NEWQ
    Or send an SQL command to Q Apply:
    INSERT INTO ASN.IBMQREP_APPLYCMD (CMD_TEXT) VALUES ('STARTQ=NEWQ');