ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

QSYSOPR Messages

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • QSYSOPR Messages

    Hi,

    I want to get the QSYSOPR messages for a purpose like whenever a message comes in QSYSOPR msgq it should get stored in a file with a date and time. Like for example when a job comes in a MSGW it also reflects in a QSYSOPR MSGQ with waiting for reply. it should stored in a file and when we reply that message then also it should stored in a file.

    Can anyone help?

    Thanks,
    Mini

  • #2
    Re: QSYSOPR Messages

    here's a save file with a program i use to monitor for messages in QSYSOPR. it uses MMAIL to email messages to sys admins. it only looks for inquiry messages which it seems you're asking for. you should be able to mod the code to suit your needs. the save file is at v5r2m0.
    http://www.tommyholden.com/downloads/sndmsgwait.savf
    I'm not anti-social, I just don't like people -Tommy Holden

    Comment


    • #3
      Re: QSYSOPR Messages

      Please try with RCVMSG command.
      Regards,
      Vinothkumar S.

      Comment


      • #4
        Re: QSYSOPR Messages

        Look also:

        Comment


        • #5
          Re: QSYSOPR Messages

          Hi All,

          Thanks for your reply.

          They are really valuable for me but I need some automation in which whenever an inquiry message (MSGW) comes to the QSYSOPR queue it should also be stored somewhere from where I can access it at day end. I dont want to run any program side by side which will monitor for MSGW in particular period of time and store (that would be resource heavy).

          Any Ideas?

          Thanks

          Comment


          • #6
            Inquiry messages can be fetched using QSYS2.MESSAGE_QUEUE_INFO

            SELECT MESSAGE_QUEUE_LIBRARY, MESSAGE_QUEUE_NAME, MESSAGE_ID, MESSAGE_TYPE, MESSAGE_SUBTYPE, MESSAGE_TEXT, SEVERITY, MESSAGE_TIMESTAMP, MESSAGE_KEY, ASSOCIATED_MESSAGE_KEY, FROM_USER, FROM_JOB, FROM_PROGRAM, MESSAGE_FILE_LIBRARY, MESSAGE_FILE_NAME, MESSAGE_SECOND_LEVEL_TEXT FROM QSYS2.MESSAGE_QUEUE_INFO WHERE MESSAGE_QUEUE_LIBRARY = 'QSYS' AND (MESSAGE_QUEUE_NAME = 'QSYSOPR') AND MESSAGE_TYPE = 'INQUIRY' AND MESSAGE_KEY NOT IN (SELECT ASSOCIATED_MESSAGE_KEY FROM QSYS2.MESSAGE_QUEUE_INFO WHERE MESSAGE_TYPE = 'REPLY' AND MESSAGE_QUEUE_LIBRARY = 'QSYS')

            Comment

            Working...
            X