John,
QIBM_QSH_CMD_ESCAPE_MSG doesn't *always* convert the QSH0005 from *COMP
to *ESCAPE. It only makes it an *ESCAPE if the exit status is not zero.
Going back to the code you posted, if the QSH command exits with a
status of 0, your MONMSG won't fire, and therefore you won't retrieve
RC. Outside of the MONMSG/ENDDO block you still try to use the &RC,
which will be wrong.
Within the MONMSG, your RCVMSG doesn't work because it's receiving a
*COMP message, and as you've already pointed out, in order for MONMSG to
fire, the message has to be an *ESCAPE message. So the RCVMSG won't
work even if QShell sends an *ESCAPE, because it's only receiving *COMP.
And you know you won't have a *COMP, because if you did, the MONMSG
would not have fired.
John McKee wrote:
What I neglected to add to my stripped down program was this:
ADDENVVAR ENVVAR(QIBM_QSH_CMD_ESCAPE_MSG) VALUE(Y) +
REPLACE(*YES)
The above tells QSH to send *ESC instead of *COMP, making it something
that can
be monitored.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.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 on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.