ENDRQS (End Request)
Purpose
The End Request (ENDRQS) command ends (cancels) a previously requested operation (command). One common use of the 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 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 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 are notified of the cancelation, 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 Programming
book.
Note: External objects that are locked by the Allocate Object (ALCOBJ) command are not unlocked (deallocated) by the canceled request.
Optional Parameters
- RQSLVL
- Specifies the (command) request level at which the command being canceled was entered.
*PRV: The command entered at the immediately previous level is being canceled.
request-level: 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 for ENDRQS
Example 1: Ending a Command
CALL PROGA (This is level 1) * * * Breakpoint occurs CALL PROGB (This is level 2) * * * Breakpoint occurs ENDRQS (This is level 3)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.
Example 2: Ending a Command
CALL PROGA (This is level 1) * * * Breakpoint occurs CALL PROGB (This is level 2) * * * Breakpoint occurs ENDRQS RQSLVL(1) (This is level 3)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.
Error messages for ENDRQS