<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Message Handling Procedures :: Aperio Documentation</title><link>/rpg/message/index.html</link><description>Chapter 6.4 RPG Message Handling Procedures This chapter describes procedures used to handle message in aperio.</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Mon, 01 Jan 0001 00:00:00 +0000</lastBuildDate><atom:link href="/rpg/message/index.xml" rel="self" type="application/rss+xml"/><item><title>receivePgmMsg()</title><link>/rpg/message/receivepgmmsg/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/rpg/message/receivepgmmsg/index.html</guid><description>This procedure receives message to program from call stack entry.
Parameter Type Description callStackEntry 4096A Mandatory Call stack entry. The program name from call stack to which the message was sent. msgKey 4A Mandatory Unique message key of message. Input/Output parameter. Used to loop thorugh all messahges. It can be unique message number of special value *TOP. The receivePgmMsg function will receive first message after message with mesgKey provided. msgType 10A Optional Type of message to receive. If not provided the value is defaulted to *NEXT. See QMHRCVPM api descriptin form IBM. msgAction 10A Optipnal Action to take after message is received. Valid values are *OLD, *SAME, *REMOVE. The default value is: *SAME. See QMHRCVPM api descriptin form IBM. callStackCount 10I 0 Optional Call stack counter A number identifying the location in the call stack of the call stack entry to whose message queue the message is to be sent. The number is relative to the call stack entry identified by the Call stack entry parameter. It indicates how many calls up the call stack the target entry is from the one identified by the Call stack entry parameter. it could be 0 or any positive number. callStackEntryLen 10I 0 Optional Length of call stack entry The length of the value for the Call stack entry parameter. See QMHSNDPM IBM API for more details. callStackEntryQual 20A Optional Call stack entry qualification. This parameter is used when it is necessary to further identify the call stack entry. The parameter consists of two 10 character parts. The first part is the module name qualifier and the second part is the program name qualifier. See QMHSNDPM IBM API for more details. Procedure returns message info data structure (see data structure description bellow).</description></item><item><title>removeAllPgmMsg()</title><link>/rpg/message/removeallpgmmsg/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/rpg/message/removeallpgmmsg/index.html</guid><description>This procedure removes allprogram messages sent for current call stack
Parameter Type Description callStackEntry 4096A Mandatory Call stack entry. The program name from call stack to which the message was sent. callStackCount 10I 0 Optional Call stack counter A number identifying the location in the call stack of the call stack entry to whose message queue the message is to be sent. The number is relative to the call stack entry identified by the Call stack entry parameter. It indicates how many calls up the call stack the target entry is from the one identified by the Call stack entry parameter. it could be 0 or any positive number. Procedure returns indicator. *ON means, everything was ok. *OFF means, messages were not removed.</description></item><item><title>sendPgmMsg()</title><link>/rpg/message/sendpgmmsg/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/rpg/message/sendpgmmsg/index.html</guid><description>This procedure sends message to program in call stack entry.
Parameter Type Description callStackEntry 4096A Mandatory Call stack entry. The program name from call stack to which the message will be sent. msgId 7A Mandatory Message id in the message file. fields 1024A Optipnal Names of fields, coma separated, for which the message was issued. Programmer can indicate the message receiver that message is connected functionally with these fields. msgDta 32767A Optional Data which will replace variables in messages msgLen 10I 0 Optional Mandatory if msgData was provided. Length od message data in bytes. msgType 10A Optional Default value : *INF0. The type of the message. See message type list. msgFile 10A Optional For a predefined message, the name of the message file and the library in which it resides. The first 10 characters specify the file name, and the second 10 characters specify the library. You can use these special values for the library name: *CURLIB, *LIBL callStackCount 10I 0 Optional Call stack counter A number identifying the location in the call stack of the call stack entry to whose message queue the message is to be sent. The number is relative to the call stack entry identified by the Call stack entry parameter. It indicates how many calls up the call stack the target entry is from the one identified by the Call stack entry parameter. it could be 0 or any positive number. callStackEntryLen 10I 0 Optional Length of call stack entry The length of the value for the Call stack entry parameter. See QMHSNDPM IBM API for more details. callStackEntryQual 20A Optional Call stack entry qualification. This parameter is used when it is necessary to further identify the call stack entry. The parameter consists of two 10 character parts. The first part is the module name qualifier and the second part is the program name qualifier. See QMHSNDPM IBM API for more details. Message types Message type Description *CMD Command *COMP Completion *DIAG Diagnostic *ESCAPE Escape *INFO Informational *INQ Inquiry. You can send inquiry messages only to the external message queue. *NOTIFY Notify *RQS Request *STATUS Status Procedure returns unique message key (4A).</description></item><item><title>setDftMsgFile()</title><link>/rpg/message/setdftmsgfile/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/rpg/message/setdftmsgfile/index.html</guid><description>This procedure sets default message file used to send messages.
Parameter Type Description file 10A Mandatory Message file name. library 10A Optional Message file library. If not provded then *LIBL Procedure returns *ON if everything is OK. It returns *OFF in case of any error.
Examples:
setDftMsgFile("IAFMSGF"); //or setDftMsgFile("IAFMSGF" : "IAF100AP");</description></item></channel></rss>