compiling sample programs, programming, z/OS compiling" /> Building an application on z/OS

 

Building an application on z/OS

We can write C++ programs for three of the environments that WebSphere MQ for z/OS supports:

When you have written the C++ program for your WebSphere MQ application, create an executable application by compiling, pre-linking, and link-editing it.

WebSphere MQ C++ for z/OS is implemented as z/OS DLLs for the IBM C++ for z/OS language. Using DLLs, you concatenate the supplied definition side-decks with the compiler output at pre-link time. This allows the linker to check your calls to the WebSphere MQ C++ member functions.

Note:
There are three sets of side-decks for each of the three environments.

To build a WebSphere MQ for z/OS C++ application, create and run JCL. Use the following procedure:

  1. If your application runs under CICS, use the CICS-supplied procedure to translate CICS commands in your program.

    In addition, for CICS applications we need to:

    1. Add the SCSQLOAD library to the DFHRPL concatenation.

    2. Define the CSQCAT1 CEDA group using the member IMQ4B100 in the SCSQPROC library.

    3. Install CSQCAT1.

  2. Compile the program to produce object code. The JCL for your compilation must include statements that make the product data definition files available to the compiler. The data definitions are supplied in the following WebSphere MQ for z/OS libraries:

    • thlqual.SCSQC370

    • thlqual.SCSQHPPS

    Be sure to specify the

    /cxx compiler option.

    Note:
    The name thlqual is the high level qualifier of the WebSphere MQ installation library on z/OS.

  3. Pre-link the object code created in step 2, including the following definition side-decks, which are supplied in thlqual.SCSQDEFS:

    • imqs23dm and imqb23dm for batch

    • imqs23dr and imqb23dr for RRS batch

    • imqs23dc and imqb23dc for CICS

  4. Link-edit the object code created in step 3, to produce a load module, and store it in your application load library.

To run batch or RRS batch programs, include the libraries thlqual.SCSQAUTH and thlqual.SCSQLOAD in the STEPLIB or JOBLIB data set concatenation.

To run a CICS program, first get your system administrator to define it to CICS as a WebSphere MQ program and transaction. We can then run it in the usual way.