The queue sharing group utility (CSQ5PQSG) on z/OS

We can use the CSQ5PQSG utility program to add queue sharing group and queue manager definitions to the IBM MQ Db2 tables, and to remove them.

The CSQ5PQSG utility can also be used to verify the consistency of Db2 object definitions for queue manager, CF structure, and shared queue objects, within a queue sharing group.


Invoking the queue sharing group utility

Figure 1 shows an example of the JCL used to invoke the CSQ5PQSG utility.

Figure 1. Sample JCL to invoke the CSQ5PQSG utility
//S001   EXEC PGM=CSQ5PQSG,REGION=4M,
//     PARM='function,function parameters'
//STEPLIB  DD DSN=thlqual.SCSQANLE,DISP=SHR
//         DD DSN=thlqual.SCSQAUTH,DISP=SHR
//         DD DSN=db2qual.SDSNLOAD,DISP=SHR
//SYSPRINT DD SYSOUT=*

    Data definition statements
    The CSQ5PQSG utility requires data definition statements with the following DDname:

      SYSPRINT
      This statement is required; it names the data set for print output. The logical record length (LRECL) is 125.


Syntax, keywords, and parameters


Queue sharing group utility

PARM=' ADD QMGR,qmgr-name,qsg-name,dsg-name,DB2-ssidADD QSG,qsg-name,dsg-name,DB2-ssidREMOVE QMGR,qmgr-name,qsg-name,dsg-name,DB2-ssidREMOVE QSG,qsg-name,dsg-name,DB2-ssidMIGRATE DSG,dsg-name,DB2-ssidMIGRATE QSG,qsg-name,dsg-name,DB2-ssidFORCE QMGR,qmgr-name,qsg-name,dsg-name,DB2-ssidVERIFY QSG,qsg-name,dsg-name,DB2-ssid '

A queue sharing group name ( qsg-name ) can have up to 4 characters, comprising uppercase A-Z, 0-9, $, #, @. It must not start with a numeric. For implementation reasons, names of less than 4 characters are padded internally with @ symbols, so do not use names ending in @.

The queue sharing group name must be different from any of the queue manager names within the queue sharing group.

    PARM
    This field contains the function request followed by the function-specific parameters. These are described in the following text:

      ADD QMGR
      Add a queue manager record into the CSQ.ADMIN_B_QMGR table. This operation completes successfully only if all the following conditions are met:

      • A corresponding queue sharing group record exists in the CSQ.ADMIN_B_QSG table.
      • The queue manager entry does not exist in the CSQ.ADMIN_B_QMGR table as the member of a different queue sharing group.
      • There is no member entry in the XCF group with a different QMGR number value than the one created by the utility when you add a record to the CSQ.ADMIN_B_QMGR table.

      If there are members in the XCF group without the corresponding entries in the Db2 table, we can use the utility to add them. Add queue managers in the order that is indicated by the CSQU524I messages that are issued by the queue sharing group utility (CSQ5PQSG) when it is run with the VERIFY QSG parameter.

      If a queue manager exists in Db2 table CSQ.ADMIN_B_QMGR, but is missing from MVS XCF group, we can run this utility to restore the appropriate XCF group entry, as indicated by CSQ5010E message.

        qmgr-name
        The queue manager name

        qsg-name
        The queue sharing group name

        dsg-name
        The Db2 data-sharing group name

        DB2-ssid
        The Db2 subsystem ID

      ADD QSG
      Add a queue sharing group record into the CSQ.ADMIN_B_QSG table.

        qsg-name
        The queue sharing group name

        dsg-name
        The Db2 data-sharing group name

        DB2-ssid
        The Db2 subsystem ID

      REMOVE QMGR
      Remove a queue manager record from the CSQ.ADMIN_B_QMGR table. This only completes successfully if the queue manager has either never been started, or terminated normally from its last execution.

        qmgr-name
        The queue manager name

        qsg-name
        The queue sharing group name

        dsg-name
        The Db2 data-sharing group name

        DB2-ssid
        The Db2 subsystem ID

      REMOVE QSG
      Remove a queue sharing group record from the CSQ.ADMIN_B_QSG table. This only completes successfully if no queue managers are defined to the queue sharing group.

        qsg-name
        The queue sharing group name

        dsg-name
        The Db2 data-sharing group name

        DB2-ssid
        The Db2 subsystem ID

      MIGRATE DSG

      Verify that all the queue managers in the data-sharing group are at a version that is compatible with IBM MQ Version 9.2.

        dsg-name
        The Db2 data-sharing group name

        DB2-ssid
        The Db2 subsystem ID

      This function does not do the migration, which involves several steps.

      MIGRATE QSG

      Verify that all the queue managers in the data-sharing group are at a version that is compatible with IBM MQ Version 9.2.

      The MIGRATE QSG and MIGRATE DSG functions perform the same function. The only difference is in the scope of the processing. MIGRATE QSG works on a single queue sharing group only, MIGRATE DSG works on all queue sharing groups that are defined within the data-sharing group.

        qsg-name
        The queue sharing group name

        dsg-name
        The Db2 data-sharing group name

        DB2-ssid
        The Db2 subsystem ID

      This function does not do the migration, which involves several steps.

      FORCE QMGR
      Remove a queue manager record from the CSQ.ADMIN_B_QMGR table, even if the queue manager has terminated abnormally.

      Use the FORCE option, rather than REMOVE, to remove the last queue manager in a queue sharing group.

      Attention: This can override IBM MQ efforts to maintain data in a consistent state. Only use this function when we cannot carry out the procedure for removing a queue manager from a queue sharing group on page Removing a queue manager from a queue sharing group.

        qmgr-name
        The queue manager name

        qsg-name
        The queue sharing group name

        dsg-name
        The Db2 data-sharing group name

        DB2-ssid
        The Db2 subsystem ID

      VERIFY QSG
      Validate the consistency of the Db2 object definitions for queue manager, CF structure, and shared queue objects, within the queue sharing group.

        qsg-name
        The queue sharing group name

        dsg-name
        The Db2 data-sharing group name

        DB2-ssid
        The Db2 subsystem ID


Example

The following sample JCL adds an entry for queue manager QM01 into queue sharing group QSG1. It specifies a connection to Db2 subsystem DB2A, which is a member of Db2 data-sharing group DSN510PG.

Figure 2. Using the queue sharing group utility to add a queue manager into a queue sharing group
//S001   EXEC PGM=CSQ5PQSG,REGION=4M,
//     PARM='ADD QMGR,QM01,QSG1,DSN510PG,DB2A'
//STEPLIB  DD DSN=thlqual.SCSQANLE,DISP=SHR
//         DD DSN=thlqual.SCSQAUTH,DISP=SHR
//         DD DSN=db2qual.SDSNLOAD,DISP=SHR
//SYSPRINT DD SYSOUT=*
Parent topic: Use the IBM MQ utilities on z/OS