I am working on an RPG program in which I have a need to use the QCMDEXC command to perform a CL operation (for example ADDPFM). I have been able to run the QCMDEXC command but I dont have a definite answer on how I can track any MONMSG's that come out of running the CL command? For instance, when trying to add a member to a physical file, if there is an error, I want to know what that error message is so that I can chose the next instruction on my RPG.
I do not want to use the option of calling a CL from my RPG to perform the commands. I have to get all this done with a single RPG.
Thanks for your help.