The SET command sets a value into an @-variable.
SET variable value
SET variable EVAL expression
In the second form, the expression may include the four arithmetic operators +, -, * and /. These operators must be surrounded by spaces. Any @-variables in the expression will be expanded.
SET USER.RETURN.CODE 1
The above command sets the @USER.RETURN.CODE variable to 1.
SET CT 5
SET CT EVAL @CT - 1
IF @CT = 0 THEN STOP
This paragraph executes the loop five times, displaying the decreasing values stored in @CT on each cycle.
SET @PRINT ""
IF <<I2,Select branch>> EQ "" THEN STOP
IF <<I3,Print (Y/N)?>> EQ "Y" THEN SET @PRINT LPTR
LIST LOANS WITH BRANCH EQ "<<Select branch>>" _
BY NAME PAN SCROLL TITLE DATE NAME ID.SUP <<@PRINT>>
The above paragraph shows use of a user defined @-variable to control whether the paragraph directs the report to the display or to a printer. The @PRINT variable is set to a null string at the start of the paragraph in case it already exists from previous actions in the same session. Later, if the user wants the report sent to a printer, this variable is set to "LPTR". The value of @PRINT is then included in the query sentence executed by the paragraph.