Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

RPG program to MONITOR a message Queue

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

  • RPG program to MONITOR a message Queue

    I am looking for some tips/samples on how to write an RPG program to monitor a message Queue. The final program would send an e-mail message on detecting certain messages, but I am looking for how to get started and understand the concepts of monitoring (Reading) a message queue.

  • #2
    RPG program to MONITOR a message Queue

    A good place to start researching any API is library QSYSINC. For instance QSYSINC/H.QMHRCVM shows the C language prototype for the Receive Nonprogram Message API. You can use this info to build your own RPGLE prototype so that you can call the API directly from your RPGLE program. This API can return data in several formats depending on what you ask it to do. You can convert the C descriptions of the return structures into an RPG data structure yourself or save the exercise for another day by using QSYSINC/QRPGLESRC.QMHRCVM. As always check the Sorcerer's Guide http://publib-b.boulder.ibm.com/Redb...0?OpenDocument and IBM's documentation http://publib.boulder.ibm.com/html/a...apis/messg.pdf Of course it doesn't hurt to search MCPressOnline either! There's a lot of terrific info and insight to be had for little effort. Here's some code to get you on your way. Create a message queue in your library and send a few messages to it, then run your test program in debug to see what kind of data is returned. Tom D.
    Code

    Comment

    Working...
    X