RRS Considerations

Consider using this information if the application program uses RRS to coordinate updates.

IBM MQ provides two different stubs for batch programs which need RRS coordination - see The RRS batch adapter. The difference in behavior of later API calls is determined at MQCONN time by the batch adapter from information passed by the stub routine on the MQCONN or MQCONNX API. This means that dynamic API calls are available for batch programs which need RRS coordination, provided that the initial connection to IBM MQ was done by using the appropriate stub. The following example illustrates this:
       WORKING-STORAGE SECTION.
           05 WS-MQOPEN       PIC X(8) VALUE 'MQOPEN' .
.
.
.
       PROCEDURE DIVISION.
.
.
.
       *
       * Static call to MQCONN must be resolved by linkage edit to
       * CSQBRSTB or CSQBRRSI for RRS coordination
       *
           CALL 'MQCONN' USING W00-QMGR
                               W03-HCONN
                               W03-COMPCODE
                               W03-REASON.
.
.
.
       *
           CALL WS-MQOPEN  WS-HCONN 
                           MQOD 
                           WS-OPTIONS 
                           WS-HOBJ 
                           WS-COMPCODE 
                           WS-REASON.
Parent topic: Dynamically calling the IBM MQ stub