Branching Operations

The branching operations are shown in the following table.

Table 61. Branching Operations
Operation Traditional Syntax Free-Form Syntax
Compare and Branch CABxx (Compare and Branch) (not allowed)
Go To GOTO (Go To) (not allowed)
Iterate ITER (Iterate)
Leave LEAVE (Leave a Do/For Group)
Leave a subroutine LEAVESR (Leave a Subroutine)
Tag TAG (Tag) (not allowed)

The GOTO operation (when used with a TAG operation) allows branching. When a GOTO operation occurs, the program branches to the specified label. The label can be specified before or after the GOTO operation. The label is specified by the TAG or ENDSR operation.

The TAG operation names the label that identifies the destination of a GOTO or CABxx operation.

The ITER operation transfers control from within a DO-group to the ENDDO statement of the DO-group.

The LEAVE operation is similar to the ITER operation; however, LEAVE transfers control to the statement following the ENDDO operation.

The LEAVESR operation causes control to pass to the ENDSR operation of a subroutine.

See each operation for an explanation of its function.



[ Top of Page | Previous Page | Next Page | Contents | Index ]