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 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).
Examples:
//Send simple message to MGRR0001 program message queue.
sendPgmMsg("MGRR0001" : "MSG0001");
//or
//Send message to MGRR0001 program message queue. This time
//olso the field names are provided.
sendPgmMsg("MGRR0001" : "MSG0002" : "item, warehouse");
//or
//Send message to MGRR0001 program message queue. This time
//message contains data fields.
xxData = xxItem + xxWarehouse;
sendPgmMsg("MGRR0001" : "MSG0003"
:"customer, warehouse"
: xxData : %len(xxData));