Using a LET Substitution in a COMPUTE or DEFINE Command

A semicolon must follow an expression in a COMPUTE or DEFINE command. To use a LET substitution in a DEFINE or COMPUTE, you must include two semicolons in the LET syntax. You cannot create a LET substitution for a phrase that contains a semicolon.

Example: Using a LET Substitution in a COMPUTE or DEFINE Command

The following LET syntax includes two semicolons, since the substitution will be made in a COMPUTE command:

LET
SALTEST = LEVEL/A4 = IF SALARY GT 35000 THEN HIGH
ELSE LOW;;
END

Issuing the command

AND COMPUTE SALTEST

translates the line into

AND COMPUTE LEVEL/A4 = IF SALARY GT 35000 THEN HIGH
ELSE LOW;

with one semicolon after the word LOW, as required by the expression in the COMPUTE.


Information Builders