Command reference / job

ENDRQS

End Request

The End Request (ENDRQS) command ends (cancels) a previously requested operation (command). One common use of the End Request (ENDRQS) command is to cancel a request that is currently stopped at a breakpoint. This command function is also available as an option on the System Request menu. If the End Request (ENDRQS) command cannot be processed immediately because a system function that cannot be interrupted is currently running, the command is delayed until interruption is allowed. When a request is ended, an escape message is sent to the request processing program that is currently called at the request level being canceled. Request processing programs can be canceled. Request processing programs can monitor for the escape message so that cleanup processing can be done when the request is canceled. The static storage and open files are reclaimed for any program that was called by the request processing program. None of the programs called by the request processing program is notified of the cancel, so they have no opportunity to stop processing. To become a request processing program, the program must receive a request message. If the ENDRQS command is in a program, that program must become a request processor before it issues this command. More information on how to set up a program to become a request processor is in the CL topic collection in the Programming category in the IBM i Information Center at http://www.ibm.com/systems/i/infocenter/. Note: External objects that are locked by the Allocate Object (ALCOBJ) command are not unlocked (deallocated) by the canceled request.

Allowed environments: *INTERACT, *IPGM, *IREXX, *EXEC. Positional parameters: 1.

Parameters

RQSLVL Request level

Specifies the (command) request level at which the command being canceled was entered.

Type
*INT4
Required
No
Default
*PRV
Case
Uppercase

Suggested / special values: *PRV

*PRV
The command entered at the immediately previous level is being canceled.
integer
Specify the request level at which the command being canceled was entered. All request levels from the level specified to the current level are canceled.

Examples

ENDRQS

CALL PROGA stops at a breakpoint at request level 1. CALL PROGB is then entered at level 2 and stops at a breakpoint. Enter this command at level 3. Ending a Command. In this example, because RQSLVL(*PRV) is the default, the request made at level 2 is canceled. The user can then enter another command at level 2 or press F3 to show the PROGA breakpoint display again.

ENDRQS RQSLVL(1)

CALL PROGA stops at a breakpoint at request level 1. CALL PROGB is then entered at level 2 and stops at a breakpoint. Enter this command at level 3. Ending a Command. In this example, the request made at the highest level (CALL PROGA) is canceled. Consequently, any requests made between level 1 and level 3 are also canceled.

IBM command documentation

Generated from os/cl/catalog/ENDRQS.json and os/cl/help/ENDRQS.json.