LOOKUP Statement

The LOOKUP statement is a variation of the LOOKUP function (see IF statements above). The syntax is:

LOOKUP <fspec>/Optional message if not found

If the specified file is not found, the optional message (following the /, which is mandatory) is displayed and execution continues with the following line. Otherwise, the following line is skipped. Typically this is used with GOTO to create a conditional branch, as in the following:

LOOKUP $0/$0 does not exist!

GOTO DONE                           ; (EXIT might also be appropriate here)

VUE $0

;DONE