Answer a monmsg from within CL?

205 pts.
Tags:
AS/400
CL Program
CLP
MONMSG
I have a clp that calls on a prog that sometimes issues a error message. manually i would respond with an I to ignore and all is well. Now my question, can I use monmsg msgid(mycpfmsg)to auto reply to this message. I have it monitoring inside the cl for this message since i thought that by monitoring it would already default the responce to ignore, but this message still comes up when running the program and I still have to manualy ignore. I know im missing something here but I just dont know what. Any help would be great, thanks.
ASKED: April 20, 2011  8:01 AM
UPDATED: May 2, 2011  11:03 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

Its after the program is called. I call on a seperate pog in the cl and it gives me the cpf message which I need to set for ignore.

Discuss This Question: 8  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • gfprogrammer
    Is the error message issued on the call to the program or in the program after it is called?
    240 pointsBadges:
    report
  • TomLiotta
    It depends on what kind of message it is, though it sounds like either an *ESCAPE or an *INQ (inquiry) message. We should see the message details in order to know if and how the message might be handled automatically. When the message displays and before you respond to it, move the cursor to the message text and press <F1>. When the message display is shown, press <F9> to see the message details. Copy/paste the message details back here. We should see at least the message ID, the message type, the from-program and the to-program from the details. It's likely that there will be a question or two about those details before an answer is reasonable. Tom
    125,585 pointsBadges:
    report
  • HMSSL2K
    Why not just setup a System Reply List Entries, WRKRPYLE
    3,175 pointsBadges:
    report
  • JC400IT
    Hello Lotofbad, Try using the i’s Sytem Reply List to automatically reply the (i)gnore. The command is WRKRPYLE He is a sample Change Reply List Entry (CHGRPYLE) Type choices, press Enter. Sequence number . . . . . . . . > 99 1-9999 Message identifier . . . . . . . CPA7025 Character value, *SAME, *ANY Compare data: Comparison data . . . . . . . 'JRNL' Message data start position . 5 1-999, *SAME, *NONE Message reply . . . . . . . . . 'I' Additional Parameters By using this you don’t evening need to make any programming changes. I hope this will help. JC400IT
    55 pointsBadges:
    report
  • TomLiotta
    Note that the System Reply List can affect any job that runs with the INQMSGRPY(*SYSRPYL) attribute set on and that you need to set it on for jobs that you want to use the System Reply List. That is, it can affect an unintended job. And it won't affect your intended job unless it is configured for it. Tom
    125,585 pointsBadges:
    report
  • TomLiotta
    Note that an *INQ message can't be monitored at all. MONMSG only reacts to *ESCAPE, *NOTIFY or *STATUS messages. If it is an *INQ message, then it will depend on where it is sent among other possible things. But if it is an *INQ message that is generated because of an unhandled *ESCAPE message, then the answer will go to how to handle the *ESCAPE message in order to avoid the *INQ message from ever showing up. Tom
    125,585 pointsBadges:
    report
  • lotofbad
    I looked at the message queue the message is coming from (I think) it says that it is *ext. With that said could i use something like this... pgm dcl VAR(&MSGKY) TYPE(*CHAR) LEN(6) call mylib/pgm RCVMSG MSGQ(*ext) MSGTYPE(*LAST) KEYVAR(&MSGKY) SNDRPY MSGKEY(&MSGKY) MSGQ(*ext) RPY('I') CCSID(65535) endpgm Thanks for are the support guys.
    205 pointsBadges:
    report
  • TomLiotta
    ...could i use something like this… Probably not. The message will be displayed as part of processing the CALL command. A reply will be required before the program moves on to the RCVMSG command. That is, by the time RCVMSG is executed, it will all be over. The reply will already be done. If you can copy/paste a portion of a joblog that demonstrates the messaging, there is probably a good solution available. (And the most useful solution just might be the System Reply List.) Tom
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following