The Get samples for the batch environment on z/OS

To run the samples, edit and run the sample JCL, as described in Preparing and running sample applications for the batch environment on z/OS.

The programs take the following parameters in an EXEC PARM, separated by spaces in C and commas in COBOL:
  1. The name of the queue manager (4 characters)
  2. The name of the target queue (48 characters)
  3. The number of messages to get (up to 4 digits)
  4. The browse/get message option (1 character: B to browse or D to destructively get the messages)
  5. The syncpoint control (1 character: S for syncpoint or N for no syncpoint)

If you enter any of these parameters incorrectly, you receive appropriate error messages.

Output from the samples is written to the SYSPRINT data set:
=====================================
PARAMETERS PASSED :
QMGR    - VC9
QNAME    - A.Q
NUMMSGS   - 000000002
GET     - D
SYNCPOINT  - N
=====================================
MQCONN SUCCESSFUL
MQOPEN SUCCESSFUL
000000000 : 000000010 : **********
000000001 : 000000010 : **********
000000002 MESSAGES GOT FROM QUEUE
MQCLOSE SUCCESSFUL
MQDISC SUCCESSFUL
Parent topic: The Get samples on z/OS