By default, the implementation of the IDMS MQ adapter API functions provided with SO07191 is such that MQ application programs should invoke the API statically, and that IDMS internally invokes MQ dynamically.
This is the recommended mode of operation as it offers the best performance.
However, for reasons of compatibility with existing code, it may be desirable to have MQ application programs invoke the API dynamically.
This document describes how this can be accomplished.
The default behaviour of the IDMS MQ adapter functions is that they be invoked statically. This means that:-
* RHDCD1MQ is used as provided (i.e., its link-edit does not include the IBM MQ stub module CSQBSTUB)
* The CSQBSTUB must be made available to the CV via the CDMSLIB ddname.
* IDMSMQI is used as provided and not re-linked in any way.
* Application programs must include IDMSMQI in their link-edit.
It also means that application program MQ functions are invoked in the following manner:
CALL 'MQCONN' USING WS-QMGR WS-HCONN WS-COMPCODE WS-REASON.
CALL MQCONN( ... )
Use the ADS built-in-functions, e.g. MQCONN(QManagerName, ConnectionHandle, CompCode, RsnCode)
Release : 19.0
Component : CA IDMS/DB
In order to allow the IDMS MQ adapter functions to be invoked dynamically, the following steps must be done.
IDMS module IDMSMQI must be re-linked using the following SYSIN.
Be sure to re-link it into CUSTOM.LOADLIB and not override the provided IDMSMQI.
Note: it is now no longer necessary to include IDMSMQI in the link-edit of application programs.
Define the function modules to the IDMS System Generation
All of the modules mentioned as an ALIAS in the above SYSIN must be defined to the IDMS System Generation as a PROGRAM with the SAVEAREA attribute.
ADD PROGRAM MQCONN
LANGUAGE IS ASSEMBLER
Internally, IDMS must now invoke MQ statically.
Therefore, RHDCD1MQ must be re-linked using the following SYSIN.
Be sure to re-link it into CUSTOM.LOADLIB and not override the provided RHDCD1MQ.
ORDER RHDCD1MQ, CSQBSTUB
SETOPT PARM(REUS (SERIAL))
Note: it is now no longer necessary to have the CSQBSTUB module in the CV CDMSLIB.
With the above in place, the API function calls can be dynamic. Examples:
MOVE 'MQCONN' TO WS-MQCONN.
CALL WS-MQCONN USING WS-QMGR WS-HCONN WS-COMPCODE WS-REASON.
Or use the IDMS TRANSFER CONTROL verb
TRANSFER TO ('MQCONN') ...
LINK TO PROGRAM 'MQCONN' ...
When compiling MQ related programs and including IDMSMQI in the link edit, it is possible to encounter the following warning message:
IEW2609W 5104 SECTION IDMSMQI USABILITY ATTRIBUTE OF REUSABLE CONFLICTS WITH REQUESTED USABILITY OF REENTRANT.
It is safe to ignore this warning.