Invoking the IDMS MQ API dynamically
search cancel

Invoking the IDMS MQ API dynamically

book

Article ID: 143138

calendar_today

Updated On:

Products

IDMS IDMS - Database

Issue/Introduction

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.

Due to the fact that this change involves re-linking IDMS-supplied load modules, only one of these methods can be used in a CV at a time.

Environment

Release: All supported releases.

Cause

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 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:

COBOL

CALL 'MQCONN' USING WS-QMGR WS-HCONN WS-COMPCODE WS-REASON.

Assembler

L     R15,=V(MQCONN)
BASR  R14,R15

PL/I

CALL MQCONN( ... )

ADS

Use the ADS built-in-functions, e.g. MQCONN(QManagerName, ConnectionHandle, CompCode, RsnCode)

Resolution

In order to allow the IDMS MQ adapter functions to be invoked dynamically, the following steps must be done.

Downlowd and extract the attached .zip file. 

Re-link IDMSMQI

Step LINKMQI in relink.txt provides sample JCL.

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

File sysgen.txt contains the necessary statements.

Re-link RHDCD1MQ

Internally, IDMS must now invoke MQ statically. Therefore, RHDCD1MQ must be re-linked. Step LINKD1MQ in relink.txt provides sample JCL.

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 must be made dynamic. Examples:

COBOL

MOVE 'MQCONN' TO WS-MQCONN.
CALL WS-MQCONN USING WS-QMGR WS-HCONN WS-COMPCODE WS-REASON.

Or use the IDMS TRANSFER CONTROL verb

Assembler

#LINK

PL/I

TRANSFER TO ('MQCONN') ...

ADS

LINK TO PROGRAM 'MQCONN' ...

Additional Information

MQ Adapter API Support
Optional Steps (for dynamic invocation of MQ API functions)

Attachments

kd143138.zip get_app