Diverting messages from a given message queue to QSYSOPR

635 pts.
Tags:
AS/400 administration
AS/400 message queues
QSYSOPR
System Operator Message Queue
Hi, Can anyone know how to divert messages from a given message queue to Qsysopr. Thanks Siddharth
ASKED: April 20, 2009  11:55 AM
UPDATED: April 23, 2009  3:04 PM

Answer Wiki

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

If I remember right, you can create a CL program to receive the messages for that message queue and send them on to Qsysopr. Then you attach the program to the message queue that you want to monitor.

In the program you would use the RCVMSG command to get the messages sent to the queue, then use the SNDMSG command to forward them on to Qsysopr.

The command to assign the program to the message queue is:

CHGMSGQ MSGQ(xxxx) DLVRY(*BREAK) PGM(pgmlib/pgmname)

Hope this helps.

Discuss This Question: 5  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
  • Sangay
    Hi, Thnks for the response. But i am confused why do we need a Program to attach. I hope you didnt misunderstand Qsysopr as User profile. It is a Message Queue. Thanks again, Siddharth
    635 pointsBadges:
    report
  • Gilly400
    Hi Siddharth, The reason that you need the program is to receive the message (and the details of the message) and to re-send it to your other message queue. Unfortunately there's no OVRMSGQ command to achieve this, so you have to use a program. This isn't about user profiles, only message queues. You don't attach the program to the message queue, you need to have the program running (normally as a batch job) - the program waits for a message to appear on QSYSOPR using the RCVMSG command, when a message appears on QSYSOPR the program receives the message details, then sends the message to your other message queue. You can specify whether or not to remove the received message on the RCVMSG command. Hope this helps. Regards, Martin Gilbert.
    23,730 pointsBadges:
    report
  • Gilly400
    Hi, My post should read that the program sits on your other message queue waiting for a message to send to QSYSOPR, not the other way around. Diverting a message to QSYSOPR should work the same as diverting a message to any queue - the program waits for a message, receives it and then sends it to the other queue. Regards, Martin Gilbert.
    23,730 pointsBadges:
    report
  • Vatchy
    I agree that you don't HAVE to have the program attached to the message queue but, if you do, you don't have to worry about submitting the program to batch or the program ending and nobody noticing. If you attach the program to the message queue then all messages will be forwarded automatically.
    1,410 pointsBadges:
    report
  • Gilly400
    Hi, There's another reason why I suggest to use the program as a batch program - I believe that if you use the CHGMSGQ command this only stays in effect for the duration of your job. Once you sign-off, the program is no longer attached to your message queue. Regards, Martin Gilbert.
    23,730 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