title: How to receive a message in a CL program?
body: <p>Suppose there is a CL program using QCMDEXC API to execute another CL command, and the executed CL command is likely to return some messages. How to receive and retrieve the details of these messages if they are returned? I want this program to be able to write the details of the messages, like the message ID, severity and first level message into a file using QMQRY.</p>