Q
Problem solve Get help with specific problems with your technologies, process and projects.

Finding the value for the 'message key' parameter

One Search400.com member writes, "I am trying to set up a reply to a message that I am monitoring for. How do I find the value for the 'message key' parameter for the sndrpy command?"

I am trying to set up a reply to a message that I am monitoring for. How do I find the value for the 'message key' parameter for the sndrpy command?
If you take a look at the HELP text for the SNDRPY command you see:

Examples for SNDRPY

SNDRPY MSGKEY(&KEY) MSGQ(SMITH) RPY(YES)

This command sends a reply of YES to the message whose reference key is specified by &KEY, which was received at message queue SMITH. Because the reply contains only one word, the reply does not have to be enclosed in apostrophes.

The MSGKEY value is set when the message is received from the message queue via RCVMSG. Here is HELP text for the MSGKEY parameter of the RCVMSG command:

Message key (MSGKEY)

Specifies the message reference key of the message that is received.

*NONE
No message reference key is specified.

*TOP
The top of the message queue is used. *TOP can be used only when *NEXT is specified for the Message type (MSGTYPE) parameter. It causes the first message on the message queue to be received. For program message queues, this is the message following the last request message that was received, if any.

name

Specify the name of the CL variable that contains the message reference key of the message to be used by this receive function. The variable must be a character variable having a length of four characters.

Dig Deeper on i5-OS

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataCenter

Close