Set up the IMS adapter

 

The WebSphere MQ-IMS adapter (generally referred to in this book as the IMS adapter) is required to use WebSphere MQ within IMS.

This section tells you how to make the IMS adapter available to your IMS subsystem. If you are not familiar with tailoring an IMS subsystem, see the IMS Customization Guide.

To make the IMS adapter available to IMS applications, follow these steps:

  1. Define WebSphere MQ to IMS as an external subsystem using the IMS external subsystem attach facility (ESAF). See Defining WebSphere MQ to IMS.

  2. Include the WebSphere MQ load library thlqual.SCSQAUTH in the JOBLIB or STEPLIB concatenation in the JCL for your IMS control region and for any dependent region that connects to WebSphere MQ (if it is not in the LPA or link list). If your JOBLIB or STEPLIB is not authorized, also include it in the DFSESL concatenation after the library containing the IMS modules (usually IMS RESLIB).

    Also include thlqual.SCSQANLx (where x is the language letter).

  3. Copy the WebSphere MQ assembler program CSQQDEFV from thlqual.SCSQASMS to a user library.

  4. The supplied program, CSQQDEFV, contains one subsystem name CSQ1 identified as default with an IMS language interface token (LIT) of MQM1. We can retain this name for testing and installation verification. For production subsystems, we can change the NAME=CSQ1 to your own subsystem name or use CSQ1. You can add further subsystem definitions as required. See Defining WebSphere MQ queue managers to the IMS adapter.

  5. Assemble and link-edit the program to produce the CSQQDEFV load module. For the assembly, include the library thlqual.SCSQMACS in your SYSLIB concatenation; use the link-edit parameters

    RENT,AMODE=31,RMODE=ANY. This is shown in the sample JCL in thlqual.SCSQPROC(CSQ4DEFV).

  6. Include the user library containing the module CSQQDEFV that you created in the JOBLIB or STEPLIB concatenation in the JCL for your IMS control region and for any dependent region that connects to WebSphere MQ. If you do not do this, you will receive a user 3041 abend from IMS.

  7. If the IMS adapter detects an unexpected WebSphere MQ error, it issues a z/OS SNAP dump to DDname CSQSNAP and issues reason code MQRC_UNEXPECTED_ERROR to the application. If the CSQSNAP DD statement was not in the IMS dependent region JCL, no dump is taken. If this happens, you could include the CSQSNAP DD statement in the JCL and rerun the application. However, because some problems might be intermittent, it is recommended that you include the CSQSNAP DD statement to capture the reason for failure at the time it occurs.

  8. If you want to use dynamic WebSphere MQ calls (described in the WebSphere MQ Application Programming Guide), build the dynamic stub, as shown in Figure 13.

  9. If you want to use the IMS trigger monitor, define the IMS trigger monitor application CSQQTRMN, and perform PSBGEN and ACBGEN. See Set up the IMS trigger monitor.

  10. If you are using RACF to protect resources in the OPERCMDS class, ensure that the userid associated with yourWebSphere MQ queue manager address space has authority to issue the MODIFY command to any IMS system to which it might connect.

Figure 13. Sample JCL to link-edit the dynamic call stub. This includes the IMS language interface module and the WebSphere MQ IMS stub CSQQSTUB.

//DYNSTUB EXEC PGM=IEWL,PARM='RENT,REUS,MAP,XREF'
//SYSPRINT DD  SYSOUT=*
//ACSQMOD  DD DISP=SHR,DSN=thlqual.SCSQLOAD
//IMSLIB   DD  DISP=SHR,DSN=ims.reslib
//SYSLMOD  DD  DISP=SHR,DSN=private.load1
//SYSUT1   DD  UNIT=SYSDA,SPACE=(CYL,1)
//SYSLIN   DD  *
  INCLUDE ACSQMOD(CSQQSTUB)
  INCLUDE IMSLIB (DFSLI000)
  ALIAS MQCONN,MQCONNX,MQDISC    MQI entry points
  ALIAS MQGET,MQPUT,MQPUT1       MQI entry points
  ALIAS MQOPEN,MQCLOSE           MQI entry points
  ALIAS MQBACK,MQCMIT            MQI entry points
  ALIAS CSQBBAK,CSQBCMT          MQI entry points
  ALIAS MQINQ,MQSET              MQI entry points
  ALIAS DFSPLI,PLITDLI           IMS entry points
  ALIAS DFSCOBOL,CBLTDLI         IMS entry points
  ALIAS DFSFOR,FORTDLI           IMS entry points
  ALIAS DFSASM,ASMTDLI           IMS entry points
  ALIAS DFSPASCL,PASTDLI         IMS entry points
  ALIAS DFHEI01,DFHEI1           IMS entry points
  ALIAS DFSAIBLI,AIBTDLI         IMS entry points
  ALIAS DFSESS,DSNWLI,DSNHLI     IMS entry points
  MODE AMODE(31),RMODE(ANY)      Note RMODE
  NAME CSQQDYNS(R)
/*

1Specify the name of a library accessible to IMS applications that 
want to make dynamic calls to WebSphere MQ.