Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Random branch destinations

&pagelevel(4)&pagelevel

Branch to an S tag

The GOTO command branches to the command line with the specified tag (TAG:) within the procedure. The procedure run is then resumed with this command call.

The GOTO command can be used only to exit a command block or within a command block. It is not possible to branch into a command block from the outside using GOTO, i.e. GOTO can address branch destinations on superordinate nesting levels but not on subordinate levels.

Example

The lines below are examples illustrating what uses of the GOTO branch command are allowed and what uses are not allowed.

/LOOP1: WHILE (A < B)
/ADD1: X = X + A
/LOOP2: WHILE (X < Y)
/ADD2: A = A + 1
/  GOTO ADD1              “Allowed; goes to surrounding loop”
/  END-WHILE LOOP2
/  GOTO ADD2              “Not allowed; goes to inside loop!”
/END-WHILE LOOP1

Branch to a non-S tag

The SKIP-COMMANDS and WAIT-EVENT commands are SDF commands of the BS2000 basic configuration that are supported for the sake of compatibility with non-S procedures.

As branch destinations, these commands recognize tags in non-S format only (.tag). Non-S tags must not be used within command blocks; they can be used only on the highest procedure level, i.e. on nesting level 0.

SKIP-COMMANDS can be used to perform conditional and unconditional branches. The branch destination is the command with the specified tag, where procedure execution is resumed.

WAIT-EVENT can be used to make the chronogical execution of a job dependent on the user switch settings (only in batch jobs) or on the status of a job variable (JV).

Both commands are described in “Commands” [3].