IBM Support

Understanding What Controls the Automatic Reply Function

Troubleshooting


Problem

This document describes why the system will automatically reply to an inquiry message.

Resolving The Problem

Sometimes the system will automatically reply to an inquiry message, and in other cases it will not. There is often confusion when automatic replies are (or are not) happening as desired by the user. This document explains what controls the automatic reply function.

The first thing that controls the reply is the INQMSGRPY job attribute. This is defined in the job description and can be changed by the CHGJOB command. It can be displayed via Option 2 on the DSPJOB or WRKJOB display. This can have one of the following three values:
 
*RQD A reply must be entered for inquiry messages sent by this job.
*SYSRPYL The system reply list will be used to reply to inquiry messages. If there is no matching system reply list entry, or if the system reply list entry has a reply value of *RQD, a reply must be entered.
*DFT The default message reply is automatically sent for all inquiry messages sent by this job. The default reply is defined in the message description (DSPMSGD will show the default reply), and if there is no default reply defined in the message description, a system default reply of *N will be used.

If *SYSRPYL is specified for the job's INQMSGRPY value, the system reply list will be used to reply to the message. Use the Work with Reply List Entries (WRKRPYLE) command to see the reply list entries. The system reply list entries are searched for a matching message ID and compare value (if specified in the reply list entry). If a match is found, the reply list entry is used to determine what reply to send. If a reply value of *RQD is specified in the reply list entry, a reply must be entered for the message by the user.

The system reply list is searched in order by sequence number, and the first entry found that matches the message ID is used. The message ID in the reply list entry can be *ANY, a generic message ID, or a specific message ID. Generic message IDs are message IDs that end with 00 or 0000. For example, CPA0000 would match any message ID with a CPA prefix; CPA0700 would match any message ID in the range CPA0700 to CPA07FF.
NOTE:  IBM ships 4 generic message IDs in the system reply list, CPA0700, RPG0000, CBE0000, and PLI0000.  These can be removed, however, one might have to reply to messages that would normally be automatically replied to and more jobs may be seen in MSGW on WRKACTJOB.  If the entries are going to be removed, take note of the entries so that they can be added back if the resulted behavior causes problems.

If the inquiry message is being sent to a standard message queue (QSYSOPR, workstation message queue, user message queue, etc.), the delivery mode of the message queue is checked, unless the message was replied to by using the system reply list. If the delivery mode is set to *DFT, the default reply will be sent for the message. *N will be sent as the reply if there is no default reply. The delivery mode is set by the CHGMSGQ CL command. The delivery mode of a message queue can be determined from the DSPMSG or WRKMSG display. In basic assistance level, press F22 to see the delivery mode. In intermediate assistance level the delivery mode is shown at the top of the screen.

Once an inquiry message has been sent to a standard message queue (assuming that it has not already been replied to), a reply may be sent to the message in one of the following ways:
o A user enters a reply from the DSPMSG or WRKMSG display.
o A user views the message using Option 7 on a screen such as WRKACTJOB or WRKWTR and enters a reply.
o The message is deleted. This can be done by a user from the DSPMSG or WRKMSG display, with the CLRMSGQ command, or by a program that receives or removes the message. When a message is deleted, the default reply (or *N) is sent as the reply.
o A program sends a reply with the SNDRPY command or the QMHSNDRM API.
If the inquiry message is sent to the *EXT message queue in an interactive job, the job's INQMSGRPY job attribute (and possibly the system reply list) are checked to determine if the message should be automatically replied to. If a reply is required, the program message display is shown and the user can enter a reply. If the user presses enter without entering a reply value, the default reply (or *N) is used. If the inquiry message is sent by the SNDPMSG macro (IBM® programs only) or with the QMHSNDPM API, a wait time can be specified (this is not available on the SNDPGMMSG command). If the wait time expires before the user enters a reply (or immediately for a 0 wait time), the default reply is sent for the message.

If the inquiry message is sent to the *EXT message queue in a non-interactive job, the job's INQMSGRPY job attribute (and possibly the system reply list) are checked. If a reply list entry is not found that matches the message, the default reply (or *N) is automatically sent.

It is possible to determine how a reply was sent by looking at the 'From program'. If the reply is in the job message queue, this can be found in the job log listing. If the job is still active, it can also be found by putting the cursor on the reply message (on the command entry display or a DSPJOBLOG display), pressing F1 and then F9. For replies on standard message queues, it can be found on the listing from DSPMSG with OUTPUT(*PRINT) specified.

The following list shows what the various 'From program' values indicate:
 
QMHSNINQ The message was automatically replied to because the job's INQMSGRPY value is *DFT, the system reply list was used, the message queue is in *DFT delivery mode, or an inquiry message was sent to *EXT in a batch job.

Check to see what type of message it is, such as an inquiry or a notify. If it is a notify message, the system is going to respond to it no matter how the 'Inquiry message reply' value is set even though the message text looks like a user should be able to respond to it.
QMHDSEXT This applies only to inquiry messages sent to *EXT. It indicates that the reply came from the Program Message display. A reply may or may not have been entered on the display.
QMHDSMSS The reply was entered from the intermediate assistance level DSPMSG display.
QMHSCLVL The reply was entered from the Additional Message Display, which is displayed for the following conditions:

o If F1 is pressed with the cursor on the message on the intermediate assistance level DSPMSG display.
o If Option 5 is entered to reply to the message on the basic assistance level DSPMSG display.
o If Option 7 is entered on displays such as WRKACTJOB or WRKWTR for a job that is waiting for a message reply.
QMHRMVM A default reply was entered because the inquiry message was removed before it was replied to.
QMHRCVM A default reply was entered because the inquiry message was received and removed before it was replied to.
QMHCHGEM A notify message was monitored for and handled by this API program.
Other The SNDRPY command or QMHSNDRM API was used to send a reply to the message.

[{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"Platform":[{"code":"PF012","label":"IBM i"}],"Version":"7.1.0"}]

Historical Number

16050607

Document Information

Modified date:
09 June 2022

UID

nas8N1018052