Build Programs to Call MQ

When building a CA IDMS program to call MQ, build the JCL that performs the following tasks:
idms19
When building a CA IDMS program to call MQ, build the JCL that performs the following tasks:
  • Compile (or assemble) the program to produce object code. 
    The JCL for your compilation must include SYSLIB statements that make the IBM MQ copybooks available to the compiler. 
    The copybooks are supplied in the following IBM MQ for z/OS libraries:
    • For COBOL, thlqual.SCSQCOBC
    • For Assembler, thlqual.SCSQMACS
    • For PL/I, thlqual.SCSQPLIC
  • Link-edit the object code to produce a load module. 
    When you link-edit the code, you must include the MQ stub module IDMSMQI.
  • Store the load module in an application load library.
The following example is fragments of the JCL to link-edit the object module in the DC environment.
//***************************************************************** //** LINK PROGRAM MODULE ** //***************************************************************** //link EXEC PGM=HEWL,REGION=1024K,PARM='LET,LIST,MAP,XREF' //SYSUT1 DD UNIT=sysda,SPACE=(TRK,(20,5)) //SYSLIB DD DSN=language.linklib,DISP=SHR //IDMSLIB DD DSN=idms.cagjload,DISP=SHR //SYSLMOD DD DSN=idms.custom.loadlib,DISP=SHR //SYSPRINT DD SYSOUT=A //SYSLIN DD DSN=&&OBJECT.,DISP=(OLD,DELETE) // DD * INCLUDE IDMSLIB(IDMS) required INCLUDE IDMSLIB(IDMSMQI) required to call MQ API's ENTRY userentry NAME userprog(R)
The following load libraries are defined in the example:
  • language.linklib
    Load library that contains COBOL, Assembler, or PL/1 support modules.
  • idms.cagjload
    Data set name of the load library containing the vanilla CA IDMS executable modules
  • idms.custom.loadlib
    Data set name of the load library containing the customized CA IDMS executable modules