Optional Steps

The following optional steps enable programs to dynamically call the stub.
idms19
The following optional steps enable programs to dynamically call the stub.
Link the MQ Stub with RHDCD1MQ
The MQ stub may be linked with RHDCD1MQ.  If you use this option, place RHDCD1MQ in a library that is concatenated ahead of CAGJLOAD. RHDCD1MQ in CAGJSAMP is a sample JCL for linking the MQ stub with RHDCD1MQ. The following example shows what you need to code in SYSIN to link the MQ stub with RHDCD1MQ:  
ORDER RHDCD1MQ, CSQBSTUB  INCLUDE CAGJLOAD (RHDCD1MQ)  INCLUDE SCSQLOAD (CSQBSTUB)  ENTRY D1MQEP1  SETOPT PARM(REUS (SERIAL))  NAME RHDCD1MQ (R)
 
Note:
 Linking CSQBSTUB with RHDCD1MQ is required when the IDMSMQI stub is dynamically loaded and linked with the standard CSQB alias names
Enable Programs to Dynamically Call the IDMS MQ Stub
As an option, CA IDMS programs can dynamically invoke MQ functions. We
 
recommend that you use the call interface, or use MQ built-in functions interface for ADS dialogs. The dynamic interface is less efficient and swaps in and out of zIIP mode. When the dynamic interface is required, perform this set up by relinking the IDMS MQ stub with aliases and defining aliases as DC programs.
Relinking IDMS MQ Stub with Aliases
The IDMS MQ stub can be dynamically called from a DC application using one of the following DML LINK statements:
  •  
    ASSEMBLER
    #LINK
  •  
    COBOL
    TRANSFER CONTROL
  •  
    PL/I
     
    TRANSFER
  •  
    ADS
     
  • LINK
Dynamically calling the IDMS MQ stub uses more overhead than linking the stub with the application and calling it directly. For example, more storage and CPU are used. When using zIIP also, more SRB/TCB swaps occur.
The IDMSMQI stub must be link-edited with an alias name for each entry point that is to be called dynamically.
 
Example
 
INCLUDE AAGJMOD(IDMSMQI) ENTRY IDMSMQI ALIAS MQBACK(MQBACK) ALIAS MQCLOSE(MQCLOSE) ALIAS MQCMIT(MQCMIT) ALIAS MQCONN(MQCONN) ALIAS MQDISC(MQDISC) ALIAS MQGET(MQGET) ALIAS MQINQ(MQINQ) ALIAS MQOPEN(MQOPEN) ALIAS MQPUT(MQPUT) ALIAS MQPUT1(MQPUT1) ALIAS MQSET(MQSET) ALIAS MQSTAT(MQSTAT) SETOPT PARM(REUS=SERIAL) NAME IDMSMQI(R)
 
Defining Aliases as DC Programs
 
Each alias name must be defined as a program to CA IDMS with the SAVEAREA option.
 
Example
 
ADD PROGRAM MQCLOSE LANGUAGE IS ASSEMBLER SAVEAREA.