Thanks for your help.
Elie AARON / Proteus Airlines / France
e-mail : Elie...@aol.com
MONMSG MSGID(TCP1A77) EXEC(DO)
*(do whatever you want once you trap the error)*
*(say send to an error routine)*
ENDDO
Hope this helps,
RK.
The description of TCP1A77 I see does not look like an inquiry message.
That is, I do not see any reply choices mentioned such as (C D I or R).
However, another (inquiry) message - sent to a message queue like
QSYSOPR or *EXT - might result if the TCP1A77 is not monitored by your
program. If you have a CL program that is not handling a TCP1A77
exception (eg message type *ESCAPE), just adding a line:
MONMSG TCP1A77
... may suppress sending of the inquiry message, because the TCP1A77
message is handled. This is all conjecture. You can reply to an
inquiry message within a CL program using the SNDRPY command. However
this requires the message reference key of the original (inquiry)
message, and these can only be sent to a named message queue (or *EXT),
not a program/call message queue.
--
Karl Hanson
in fact there is no need to specify the EXEC key word in every case. If
you want to perform a special action in case of an error you can use the
following sample code:
CHKOBJ OBJ(MyLib/MyObj) OBJTYPE(*PGM)
MONMSG MSGID(CPF9801) EXEC(DO)
GOTO CMDLBL(ERROR)
ENDDO
Thomas Raddatz, Germany,
Elie AARON schrieb:
>
> I would like to intercept an error msg: in fact the TCP1A77 msg which ask for
> an answer (C D I or R).
> I think I must use the MONMSG command but I don't know what to put in the EXEC
> line.
> Do I have to put C (for example) or another command?
>
> Thanks for your help.
>
> Elie AARON / Proteus Airlines / France
> e-mail : Elie...@aol.com
>
--
*=====================================================*
e-mail Adresse:
Thomas....@Online-Club.de
Peek/400:
Der ultimative Datenbankbrowser für Ihre AS/400
Homepage:
http://www.online-club.de/~Thomas.Raddatz/
*=====================================================*