Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

MONMSG

155 views
Skip to first unread message

Elie AARON

unread,
Oct 20, 1998, 3:00:00 AM10/20/98
to
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

Richard Knechtel

unread,
Oct 20, 1998, 3:00:00 AM10/20/98
to

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.

Karl Hanson

unread,
Oct 20, 1998, 3:00:00 AM10/20/98
to
Elie AARON wrote:
>
> 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?
>

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

Thomas Raddatz

unread,
Oct 20, 1998, 3:00:00 AM10/20/98
to Elie AARON
Hello Elie,

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/

*=====================================================*

Orangtang

unread,
Oct 22, 1998, 3:00:00 AM10/22/98
to
If you use MONMSG, you don't have to respond to the message..the message will
not require a response..just MONMSG(TCP1A77) EXEC(DO)
and whatever you want to do..continue on..go to ENDPGM...whatever....Ron

0 new messages