Label

From VSI OpenVMS Wiki
Jump to: navigation, search

A label is a statement in a DCL command procedure that marks a certain place in the command procedure for purposes of execution flow control. It can be any string preceded by a dollar sign and followed by a colon (:):

$ SHOW TIME
$LOOP:
$ FILE = F$SEARCH("FILE.LIS")
...

In the example above, "LOOP" is a label. It is possible to refer to this label with GOTO or GOSUB as well as /END and /ERROR qualifiers of the READ command and some other commands.