RETURN

Generated from C.65.00 /SYSADMIN/PUB/MYCICAT last modified on Sun Aug 29 15:08:37 2004

Back to Main Index


RETURN


     Causes execution to return from the current User Command
     (UDC or command file) to the calling environment.

SYNTAX


     RETURN


PARAMETERS


None


OPERATION


     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.


EXAMPLE(S)


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

ENDIF

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