Hitachi

Job Management Partner 1 Version 10 Job Management Partner 1/Advanced Shell Description, User's Guide, Reference, and Operator's Guide


exit command (exits the shell)

Organization of this page

Format

exit  [n]

Description

This command exits the shell. Regardless of the value of the return code, this command terminates normally or with an error on the basis of whether the command syntax is valid.

If no argument is specified, the command terminates normally with the return code of the command that executed last as its return code. When executed with an appropriate numeric value specified for the argument, the command terminates normally. When executed with an invalid value, such as non-numeric characters, specified as the argument, the command terminates with an error. When the command terminates with an error, it returns 1 as the return code.

When this command is executed within a job step error block, the results are as follows:

Arguments

n ~<unsigned integer>((0 to 255))

Specifies the return code to be set upon exiting the shell. If this argument is omitted, the command exits the shell with the return code of the last command that executed. If you specify 256 or a greater value for this argument, the command terminates normally with a return code that is the remainder of dividing the specified value by 256. If you specify a negative value for this argument, the command terminates normally with a return code that is the two's complement of the specified value.

Return codes

Return code

Meaning

0 to 255

Normal termination

  • Returns either n or the return code of the last command that executed.

1

Error termination

  • A non-numeric value was specified for n.

Notes

Usage example