The Put samples for the CICS environment
The transactions take the following parameters separated by commas:
- The number of messages (up to 4 digits)
- The padding character to write in the message (1 character)
- The number of characters to write in the message (up to 4 digits)
- The persistence of the message (1 character: P for persistent or N for
nonpersistent)
- The name of the target queue (48 characters)
If you enter any of the above parameters wrongly, you receive appropriate
error messages.
For the COBOL sample, invoke the Put sample in the CICS(R) environment
by entering:
MVPT,9999,*,9999,P,QUEUE.NAME
For the C sample, invoke the Put sample in the CICS environment by entering:
MCPT,9999,*,9999,P,QUEUE.NAME
Any messages from the samples are displayed on the screen.
Usage notes
- To keep the samples simple, there are some minor functional differences
between language versions. None of the differences relate to the MQI.
- If you enter a queue name that is longer than 48 characters, its length
is truncated to the maximum of 48 characters but no error message is returned.
- Before entering the transaction, press the CLEAR key.
- For the two numeric fields, enter any number between 1 and 9999. The value
that you enter should be a positive number. For example, to put a single message,
you can enter the value 1, 01, 001, or 0001. 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, and the C program abends with an error from malloc().
- For both programs, CSQ4CCK1 and CSQ4CVK1, enter P in the persistence parameter
if you want the message to be persistent. For non-persistent messages, enter
N in the persistence parameter. If you enter any other value you receive an
error message.
- The messages are put in syncpoint because default values are used for
all parameters except those set during program invocation.