I have an Rpg program that makes a call to a command from an CMS
checkout some objects under certain circumstances. My RPG program
any errors on the call to the checkout command in the event that an
object cannot be
checked out for some reason beyond its control. However, when I try to
error I'm only getting the "program CHECKOUT ended Abnormally" message
issued by the called command but it is not capturing the preceding
CPF2469 escape message.
This escape message then causes the main program MYPGM to crash. Here's
of my code:
c call 'QCMDEXC'
c parm CmdStr
c parm CmdLen
c dow 1=1
c callp ReceiveMsg(Msg0200
c : %size(Msg0200)
c : 'RCVM0200'
c : '*'
c : 0
c : '*LAST'
c : *blanks
c : 1
c : '*REMOVE'
c : ApiError)
*ReceiveMsg makes a call to the QMHRCVPM
c if Msg0200.BytesAvail = 0
c callp LogMessage
Can anyone please shed some light as to what I might be missing. Aren't
thown by the QCMDEXC call supposed to be captured by the calling
program's Monitor /End-mon block?
Any help is greatly appreciated.