Building IMS (BMP or MPP) applications

Use this information when building IMS (BMP or MPP) applications.

If we are building batch DL/I programs, see Building z/OS batch applications. To build other applications that run under IMS (either as a BMP or an MPP), create JCL that performs these tasks:
  1. Compile (or assemble) the program to produce object code. The JCL for the compilation must include SYSLIB statements that make the product data definition files available to the compiler. The data definitions are supplied in the following IBM MQ for z/OS libraries:

    • For COBOL, thlqual.SCSQCOBC
    • For assembler language, thlqual.SCSQMACS
    • For C, thlqual.SCSQC370
    • For PL/I, thlqual.SCSQPLIC

  2. For a C application, prelink the object module created in step 1.
  3. For PL/I programs, use the compiler option EXTRN(SHORT).
  4. For a C application, if the application is not using XPLINK, use the compiler option DEFINE(MQ_OS_LINKAGE=1).
  5. Link-edit the object code created in step 1 (or step 2 for a C/370 application) to produce a load module:
    1. Include the IMS language interface module (DFSLI000).
    2. Include the IBM MQ for z/OS IMS stub program (CSQQSTUB). Figure 1 shows fragments of JCL to do this. The stub is language independent and is supplied in library thlqual.SCSQLOAD. Note: If we are using COBOL, select the NODYNAM compiler option to enable the linkage editor to resolve references to CSQQSTUB unless you intend to use dynamic linking as described in Dynamically calling the IBM MQ stub.

  6. Store the load module in an application load library.

Figure 1. Fragments of JCL to link-edit the object module in the IMS environment
⋮
//*
//* WEBSPHERE MQ FOR Z/OS LIBRARY CONTAINING IMS STUB
//*
//CSQSTUB   DD  DSN=thlqual.SCSQLOAD,DISP=SHR
//*
⋮
//LKED.SYSIN DD *
  INCLUDE CSQSTUB(CSQQSTUB)
  ⋮
/*

Before you run an IMS program, the system administrator must define it to IMS as an IBM MQ program and transaction: we can then run it in the typical way.

Parent topic: Preparing your program to run