Function
Causes a branch to be made to another (labelled) command in a job description file or macro definition file.
Format
GOTO label
The label may be of any length and must start with a digitt.
Forbidden contexts
None
A GOTO command may only be issued from a job description file or macro definition file.
Execution
Either the job description file or macro definition file is scanned for the specified label, ignoring all lines between delimiters except the first. If the GOTO command itself is between delimiters, the search starts from the command after the stopper; otherwise the search begins at the command following the GOTO command. If the end of the file is reached without the label having been found, the search starts again from the beginning of the file and continues up to the point at which the GOTO command was issued. If the label is not found, the file (if any) at the command processor level one higher is searched in the same way, but using the delimiters set at the new level. If the file at the higher level is positioned between delimiters, the GOTO command skips to the stopper before starting the search. Otherwise the search begins at the command after the macro command.
This process may need to be repeated for each macro level and job description file level (for off-line jobs), until an internally issued command, a program issued command or the top command processor level is reached. If the label is found, the reading and processing of the command continues from there, and all intermediate levels are closed. If, however, the label is not found then a command error is reported at the level of the GOTO command.
Example
GOTO 1ABC
Example
Error Messages
IS ONLY ALLOWED IN A MACRO DEFINITION FILE
THE LABEL DOES NOT START WITH A DIGIT
LABEL PARAMETER MISSING
WE CANNOT FIND THIS LABEL