RETURN (Return)

RETURN Command syntax diagram

 

Purpose

The Return (RETURN) command returns control either to the next higher call stack entry in the call stack or to the subsystem monitor that controls the job.

When used outside a CL program, this command performs the same function as the F3 key. It returns control from the most recent invocation of QCMD (the IBM-supplied control language processor that interprets and processes CL commands for the system) back to the outside program manager. When used in a CL program, this command returns control to the next command or high-level language statement in the calling program at the point where it called the returning program. If this command is used in the highest invocation level in the routing step (either the QCMD program, which is the interpretive CL command processor, or a CL program), the routing step is ended.

Note: If the RETURN command is entered interactively from the highest recursion level while the subsystem is undergoing a controlled end resulting from

  • An End Subsystem (ENDSBS) command
  • An End System (ENDSYS) command
  • A Power Down System (PWRDWNSYS) command)

end-of-job processing occurs unless you receive the inquiry message and indicate that you want to return to the command entry display.

There are no parameters for this command.

Example for RETURN

RETURN

When used in a CL program, this command returns control to the CL command or high-level language statement immediately following the point in the last calling program at which this program was called. When used in an interactive job, this command returns control to the next higher level of QCMD. If the RETURN command is run in the highest call level program (QCMD) in the routing step, an inquiry message is sent, and the user has the option of returning to the command entry display. Otherwise, the routing step ends as usual.

No error messages.