Generated from C.60.01 /SYS/PUB/CICAT last modified on Thu Jan 11 09:18:52 2001
Causes execution to return from the current User Command (UDC or command file) to the calling environment. (NM)
RETURN
None
This command terminates the execution of the currently executing User Command. Control resumes in the calling environment at the command line following the User Command in which RETURN was embedded. Invoking RETURN at the CI colon (:) prompt has no effect. This command may be issued from a session, job or program or in BREAK. Pressing [Break] has no effect on this command.
The following example uses the RETURN command to exit from a command file prematurely by testing for a parameter error condition. PARM ERROR_NUM COMMENT Display CIERR message associated with "error_num" IF NOT NUMERIC (!ERROR_NUM) THEN ECHO Expected a number. RETURN
SETVAR CIERROR ABS(!ERROR_NUM) ECHO !HPCIERRMSG The last two lines above can be combined as: ECHO ![SETVAR(CIERROR,ABS(!ERROR_NUM))] !HPCIERRMSG This line will cause a slightly different output, because the error number will precede the message. Back to Main Index