Hitachi

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


break command (exits from a loop)

Organization of this page

Format

break  [n]

Description

This command exits from a loop that occurs in a for statement, while statement, or other looping control structure. If this command is executed while processing is not in a loop, it outputs a message and terminates normally.

Argument

n

Specifies the number of nested loops from which the command is to exit. Specify 1 or a greater integer.

When n is specified, the command exits out of n loops. When n is omitted, the command exits to the first enclosing loop.

If the command is executed with a value for n that exceeds the current number of nested looping structures, it continues exiting through the outermost loop, and then outputs a message and terminates normally.

Return codes

Return code

Meaning

0

Normal termination

1

Error termination

  • 0 was specified for n.

  • A non-numeric value was specified for n.

  • A negative value or an option character string (-alphanumeric-character) was specified for n.

Notes

Usage example