Search code examples
ibm-midrange

AS400 WRKACTJOB + Opt.7=Display message (MSGW) --> What command is it?


I would like to know, which command I could use when you do a WRKACTJOB + OPT.7=Display message. It exist a command or script to achieve?

This is because I'm doing a monitor with SQLRPGLE and from this program I would like to reply this messages. Does anyone if is this possible?

Thx.


Solution

  • I don't think this is possible, or not the way you want to do it. Monitor only executes an on-error for Escape and Notify messages. Just about all the messages that require a reply are Inquiry messages.

    However, you can retrieve and reply to Inquiry messages using the message handling API's. Documentation here. ReceiveProgramMessage, and SendReplyMessage are the ones you want to look at most closely, but you will need to understand the message handling mechanism fairly well to use these effectively. I created wrapper procedures so that I could send and receive the types of messages I need to without having to pass a lot of parameters. These procedures go into a service program so I can call them from whatever program I need them in.