+

Search Tips | Advanced Search

Building CICS applications in z/OS

Use this information when building CICS applications in z/OS .

To build an application for IBM MQ for z/OS that runs under CICS, we must:

  • Translate the CICS commands in your program into the language in which the rest of our program is written.
  • Compile or assemble the output from the translator to produce object code.

    • For PL/I programs, use the compiler option EXTRN(SHORT).
    • For C applications, if the application is not using XPLINK, use the compiler option DEFINE(MQ_OS_LINKAGE=1).

  • Link-edit the object code to create a load module.

CICS provides a procedure to execute these steps in sequence for each of the programming languages it supports.

  • For CICS Transaction Server for z/OS, the CICS Transaction Server for z/OS System Definition Guide describes how to use these procedures and the CICS/ESA Application Programming Guide gives more information on the translation process.

We must include:

  • In the SYSLIB statement of the compilation (or assembly) stage, 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

  • In your link-edit JCL, the IBM MQ for z/OS CICS stub program (CSQCSTUB). Figure 1 shows fragments of JCL code to do this. The stub is language-independent and is supplied in library thlqual.SCSQLOAD.
    Figure 1. Fragments of JCL to link-edit the object module in the CICS environment
    ⋮
    //*
    //* WEBSPHERE MQ FOR Z/OS LIBRARY CONTAINING CICS STUB
    //*
    //CSQSTUB   DD  DSN=++THLQUAL++.SCSQLOAD,DISP=SHR
    //*
    ⋮
    //LKED.SYSIN DD *
      INCLUDE CSQSTUB(CSQCSTUB)
      ⋮
    /*
    
  • For CICS versions later than CICS TS 3.2, or, if we want to use IBM MQ message property APIs, or IBM MQ APIs MQCB, MQCTL, MQSTAT, MQSUB or MQSUBR, we must linkedit your object code with the CICS supplied stub, DFHMQSTB and not the IBM MQ supplied CSQCSTUB. For more information about building IBM MQ programs for CICS, see API stub program to access IBM MQ MQI calls in the CICS product documentation.

When you have completed these steps, store the load module in an application load library and define the program to CICS in the usual way.

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

Parent topic: Preparing your program to run

Last updated: 2020-10-04