Executing the EMS COBOL Sample Programs from Qshell
When you run the COBOL sample programs from Qshell, you can either run the message producer or the message consumer.
Executing the Message Producer
To execute the message producer, SXJCMP (corresponds to tibemsMsgProducer), in Qshell and send messages, follow the steps from a 5250 terminal. Note that each line is entered separately.
qsh <= from Command Entry screen > /qsys.lib/samplib.lib/sxjcmp.pgm <= one way of running producer > server tcp://url-id1:7222 <= enter your EMS server and port > queue testq <= enter your destination queue or topic > text This is my first message <= enter messages > text This is my second message <= these get queued up by the COBOL pgm > text This is my third message > <= ENTER ends the input process
The producer has sent the messages at this point.
Executing the Message Consumer
To execute the message consumer, SXJCMC (corresponds to tibemsMsgConsumer), in Qshell and receive messages, follow the steps from a 5250 terminal. Note that each line is entered separately.
qsh <= from Command Entry screen > system "call samplib/sxjcmc" <= another way to run consumer > server tcp://url-id1:7222 <= enter your EMS server and port > queue testq <= enter your destination queue or topic > <= ENTER ends the input process
To send more messages, return to your first monitor and enter the following:
> /qsys.lib/samplib.lib/sxjcmp.pgm > server tcp://url-id1:7222 > queue testq > text new message > $
Copyright © 2022. Cloud Software Group, Inc. All Rights Reserved.