[z/OS]

Features shown in the MQI samples for z/OS

A summary of the MQI features demonstrated in each of the sample applications, including the programming languages in which each sample is written, and the environment in which each sample runs.

Put samples on z/OS

The Put samples demonstrate how to put messages on a queue using the MQPUT call.

The application uses these MQI calls:
  • MQCONN
  • MQOPEN
  • MQPUT
  • MQCLOSE
  • MQDISC

The program is delivered in COBOL and C, and runs in the batch and CICS® environments. For more information, see Batch Put and Get samples for the batch application and CICS Put and Get samples for the CICS application.

Get samples on z/OS

The Get samples demonstrate how to get messages from a queue using the MQGET call.

The application uses these MQI calls:
  • MQCONN
  • MQOPEN
  • MQGET
  • MQCLOSE
  • MQDISC

The program is delivered in COBOL and C, and runs in the batch and CICS environments. For more information, see Batch Put and Get samples for the batch application and CICS Put and Get samples for the CICS application.

Browse sample on z/OS

The Browse sample demonstrates how to use the Browse option to find a message, print it, then step through the messages on a queue.

The application uses these MQI calls:
  • MQCONN
  • MQOPEN
  • MQGET for browsing messages
  • MQCLOSE
  • MQDISC

The program is delivered in the COBOL, assembler, PL/I, and C languages. The application runs in the batch environment. For more information on the batch application, see Batch Browse sample.

Print Message sample on z/OS

The Print Message sample demonstrates how to remove a message from a queue and print the data in the message, together with all the fields of its message descriptor. It can, optionally, display all of the message properties associated with each message. By removing comment characters from two lines in the source module, you can change the program so that it browses, rather than removes, the messages on a queue. This program can usefully be used for diagnosing problems with an application that is putting messages on a queue.

The application uses these MQI calls:
  • MQCONN
  • MQOPEN
  • MQGET for removing messages from a queue (with an option to browse)
  • MQCLOSE
  • MQDISC
  • MQCRTMH
  • MQDLTMH
  • MQINQMP

The program is delivered in the C language. The application runs in the batch environment. For more information on the batch application, see Batch Print Message sample (C language only).

Queue Attributes sample on z/OS

The Queue Attributes sample demonstrates how to inquire about and set the values of IBM® MQ for z/OS® object attributes.

The application uses these MQI calls:
  • MQOPEN
  • MQINQ
  • MQSET
  • MQCLOSE

The program is delivered in the COBOL, assembler, and C languages. The application runs in the CICS environment. For more information on the CICS application, see CICS Queue Attributes sample.

Mail Manager sample on z/OS

The Mail Manager sample demonstrates these techniques:
  • Using alias queues
  • Using a model queue to create a temporary dynamic queue
  • Using reply-to queues
  • Using syncpoints in the CICS and batch environments
  • Sending commands to the system-command input queue
  • Testing return codes
  • Sending messages to remote queue managers, both by using a local definition of a remote queue and by putting messages directly on a named queue at a remote queue manager
The application uses these MQI calls:
  • MQCONN
  • MQOPEN
  • MQPUT1
  • MQGET
  • MQINQ
  • MQCMIT
  • MQCLOSE
  • MQDISC
Three versions of the application are provided:
  • A CICS application written in COBOL
  • A TSO application written in COBOL
  • A TSO application written in C

The TSO applications use the IBM MQ for z/OS batch adapter and include some ISPF panels.

For more information, see TSO Mail Manager sample for the TSO application, and CICS Mail Manager sample (COBOL only) for the CICS application.

Credit Check sample on z/OS

The Credit Check sample is a suite of programs that demonstrates these techniques:
  • Developing an application that runs in more than one environment
  • Using a model queue to create a temporary dynamic queue
  • Using a correlation identifier
  • Setting and passing context information
  • Using message priority and persistence
  • Starting programs by using triggering
  • Using reply-to queues
  • Using alias queues
  • Using a dead-letter queue
  • Using a namelist
  • Testing return codes
The application uses these MQI calls:
  • MQOPEN
  • MQPUT
  • MQPUT1
  • MQGET for browsing and getting messages, using the wait and signal options, and for getting a specific message
  • MQINQ
  • MQSET
  • MQCLOSE

The sample can run as a stand-alone CICS application. However, to demonstrate how to design a message queuing application that uses the facilities provided by both the CICS and IMS environments, one module is also supplied as an IMS batch message processing program. The CICS programs are delivered in C and COBOL. The single IMS program is delivered in C.

For more information, see CICS Credit Check sample for the CICS application, and Source and JCL for the Credit Check IMS sample (C only) for the IMS application.

Message Handler sample on z/OS

The Message Handler sample allows you to browse, forward, and delete messages on a queue.

The application uses these MQI calls:
  • MQCONN
  • MQOPEN
  • MQINQ
  • MQPUT1
  • MQCMIT
  • MQBACK
  • MQGET
  • MQCLOSE
  • MQDISC

The program is delivered in C and COBOL programming languages. The application runs under TSO. For more information on the TSO application, see TSO Message Handler sample.

Distributed queuing exit samples on z/OS

The following table lists the names of the source programs of the distributed queuing exit samples:
Table 1. Source for the distributed queuing exit samples
Member name For language Description Supplied in library
CSQ4BAX0 Assembler Source program SCSQASMS
CSQ4BCX1 C Source program SCSQC37S
CSQ4BCX2 C Source program SCSQC37S
CSQ4BCX4 C Source program SCSQC37S

Data-conversion exit samples on z/OS

A skeleton is provided for a data-conversion exit routine, and a sample is shipped with IBM MQ illustrating the MQXCNVC call. The following table lists the names of the source programs of the data-conversion exit samples:
Table 2. Source for the data conversion exit samples (assembler language only)
Member name Description Supplied in library
CSQ4BAX8 Source program SCSQASMS
CSQ4BAX9 Source program SCSQASMS
CSQ4CAX9 Source program SCSQASMS
Note: The source programs are link-edited with CSQASTUB.

For more information, see Writing data-conversion exits.

Publish/Subscribe samples on z/OS

The Publish/Subscribe sample programs demonstrate the use of the publish and subscribe features in IBM MQ. There are four C and two COBOL programming language sample programs demonstrating how to program to the IBM MQ Publish/Subscribe interface.

The applications use these MQI calls:
  • MQCONN
  • MQOPEN
  • MQPUT
  • MQSUB
  • MQGET
  • MQCLOSE
  • MQDISC
  • MQCRTMH
  • MQDLTMH
  • MQINQMP

The Public/Subscribe sample programs are delivered in the C and COBOL programming languages. The sample applications run in the batch environment. For more information on the batch applications, see Publish/Subscribe samples.