── GO ─┬──────┬─ <label identifier> ───────────────────────────────────┤ └─ TO ─┘
Explanation
The GO statement causes job execution to pass directly to the point in the job where the label identifier appears. The label identifier occurs earlier or later in the job than the GO statement. One or more label identifiers can appear in front of any statement in the job. Statement List for the syntax of label identifier placement.
-
A GO statement that returns control to an earlier point in the job can result in an infinite loop, unless a conditional statement that exits the loop is also included.
-
If the same PROCESS statement is executed repeatedly by a GO loop, a run-time error might result. This can occur because the asynchronous task initiated by an earlier pass through the GO loop might still be running. A given task variable can only be used by one task at a time.
Example
Following is a partial job that uses the GO statement:
GO TO L; . . . L: RUN X;