Replying to Run-Time Inquiry Messages - IBM - RPG

When you run a program with ILE RPG procedures, run-time inquiry messages may be generated. They occur when the default error handler is invoked for a function check in a main procedure. See “Exception Handling within a Main Procedure”. The inquiry messages require a response before the program continues running.

Note: Inquiry messages are never issued for subprocedures, since the default error handling for a function check in a subprocedure causes the subprocedure to be cancelled, causing the exception to percolate to the caller of the subprocedure. See Exception Handling within Subprocedures.

If the caller of the subprocedure is an RPG procedure, the call will fail with status 00202,independent of the status code associated with the actual exception. If the failed call causes an RPG main procedure to invoke its default handler, inquiry message RNQ0202 will be issued.

You can add the inquiry messages to a system reply list to provide automatic replies to the messages. The replies for these messages may be specified individually or generally. This method of replying to inquiry messages is especially suitable for batch programs, which would otherwise require an operator to issue replies.

You can add the following ILE RPG inquiry messages to the system reply list:

ILE RPG Inquiry Messages

ILE RPG Inquiry Messages

Note: ILE RPG inquiry messages have a message id prefix of RNQ.

To add inquiry messages to a system reply list using the Add Reply List Entry command

ADDRPYLE sequence-no message-id

where sequence-no is a number from 1-9999, which reflects where in the list the entry is being added, and message-id is the message number you want to add. Repeat this command for each message you want to add.

Use the Change Job (CHGJOB) command (or other CL job command) to indicate that your job uses the reply list for inquiry messages. To do this, you should specify *SYSRPYL for the Inquiry Message Reply (INQMSGRPY) attribute.

The reply list is only used when an inquiry message is sent by a job that has the Inquiry Message Reply (INQMSGRPY) attribute specified as INQMSGRPY(*SYSRPYL). The INQMSGRPY parameter occurs on the following CL commands:

  • Change Job (CHGJOB)
  • Change Job Description (CHGJOBD)
  • Create Job Description (CRTJOBD)
  • Submit Job (SBMJOB).

You can also use the Work with Reply List Entry (WRKRPYLE) command to change or remove entries in the system reply list. For details of the ADDRPYLE and WRKRPYLE commands, see the CL and APIs section of the Programming category in the iSeries 400 Information Center.

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd Protection Status

IBM - RPG Topics