MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » October 2012

Re: Trapping a QSHELL command error in CL



fixed

Hi Alan,

Not exactly... but you could MONMSG for QSH0002, then RCVMSG (like Luis said) and extract the errno and reason code from the message data. If you determine it's an error your program didn't want to handle, you could re-send the message at that point (via SNDPGMMSG, for example.)


On 10/25/2012 7:55 AM, Alan Shore wrote:
Hi Scott - thanks for your reply.
I do know about MONMSG, that can be used to trap an error, as well as the availability of DOWHILE, DOUNTIL and DOFOR commands that can be used to implement loops.
What I didn't know (and just found out late last night) was that you could use MONMSG to capture QSH0002 errors
MONMSG(QSH0002)
However, that is just TOO all encompassing.
The question is - Can I capture the QSH0002 for ONLY error code 3489 reason code 4?
So far, my investigation has not discovered anything






Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot COM and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available here. If you have questions about this, please contact