+

Search Tips | Advanced Search

The Put samples for the batch environment on z/OS

Use this topic when considering Put samples for the batch environment.

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 (up to 4 digits)
  4. The padding character to write in the message (1 character)
  5. The number of characters to write in the message (up to 4 digits)
  6. The persistence of the message (1 character: P for persistent or N for nonpersistent)

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

Any messages from the samples are written to the SYSPRINT data set.


Usage notes

  • To keep the samples simple, there are some minor functional differences between language versions. However, these differences are minimized if we use the layout of the parameters shown in the sample run JCL, CSQ4BCJR, and CSQ4BVJR. None of the differences relate to the MQI.
  • CSQ4BCK1 allows you to enter more than four digits for the number of messages sent and the length of the messages.
  • For the two numeric fields, enter any digit in the range 1 through 9999. The value that you enter should be a positive number. For example, to put a single message, we can enter 1, 01, 001, or 0001 as the value. If you enter nonnumeric or negative values, you might receive an error. For example, if you enter -1, the COBOL program sends a 1-byte message, but the C program receives an error.
  • For both programs, CSQ4BCK1 and CSQ4BVK1, we must enter P in the persistence parameter, ++PER++, if we want the message to be persistent. If you fail to do so, the message will be nonpersistent.

Parent topic: The Put samples on z/OS

Last updated: 2020-10-04