Submitting to a Batch
You can also submit the provided COBOL sample programs to batch. If submitting these programs to batch, your input data is provided by way of the QINLINE file.
Make sure the QINLINE file is found in the job’s *LIBL. An example is provided in the product library. A sample QINLINE contains the following:
server tcp://url-id1:7222 <= enter your EMS server and port queue testq <= enter your queue name text This is my message <= this line is optional for Consumer and is ignored if present * <= denotes end of input
Edit the file member prodlib/QINLINE(QINLINE) to update the server and queue information before submitting the programs in batch.
Both the consumer and producer can be submitted to batch or a combination of batch and Qshell can be used.
- Execute the EMS COBOL sample SXJCMC from Qshell as before:
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
- Submit the producer to batch:
SBMJOB CMD(CALL PGM(samplib/SXJCMP)) INLLIBL(samplib prodlib QGPL) ALWMLTTHD(*YES)
- Submit the consumer to batch:
SBMJOB CMD(CALL PGM(samplib/SXJCMC)) INLLIBL(samplib prodlib QGPL) ALWMLTTHD(*YES)
Copyright © 2022. Cloud Software Group, Inc. All Rights Reserved.