Was this helpful?
Range (QUEL)
Declares a range variable for use in referring to a database table.
Syntax
range of rangevar is tablename {, rangevar is
  tablename}
rangevar
Specifies a synonym for a table or view. It cannot be a reserved word or the name of a field in the form. It is a 4GL name.
tablename
Specifies the name of the table or view for which the range variable substitutes. It is a 4GL name.
Description
The range statement declares range variables for use in subsequent query statements. A range variable acts as a synonym for the table name or view name and, once declared, can substitute for the table name or view name in any statement.
A range variable is generally declared in the initialize section of the frame that references the particular table. Up to 128 range variables can be in effect at any one time. In the case where a frame calls other frames that declare their own range variables, the initial frame's range variables can be lost if the total number of range variables exceeds 128. In this case, it can be preferable to define the range variables immediately before each query.
Examples
Declare range variables for the employee and dept tables:
range of e is employee, d is dept;
Declare a range variable for the table specified in the rangetable field:
range of e is :rangetable;
Last modified date: 01/30/2023