Running the AMQSPUT4 C sample

 

The C program creates messages by reading data from a member of a source file. You must specify the name of the file as a parameter when you start the program. The structure of the file must be:

   queue name
   text of message 1
   text of message 2
   ⋮
   text of message n
   blank line

A sample of input for the put samples is supplied in library QMQMSAMP file AMQSDATA member PUT.

Remember that queue names are case sensitive. All the queues created by the sample file create program AMQSAMP4 have names created in uppercase characters.

The C program puts messages on the queue named in the first line of the file; we can use the supplied queue SYSTEM.SAMPLE.LOCAL. The program puts the text of each of the following lines of the file into separate datagram messages, and stops when it reads a blank line at the end of the file.

Using the example data file the command is:

   CALL PGM(QMQM/AMQSPUT4) PARM('QMQMSAMP/AMQSDATA(PUT)')

 

Parent topic:

The Put sample programs


fg17170_