LOCATE
The LOCATE statement specifies where to store a TEXT or BYTE value.
filename is the name of a file in which to store the TEXT or BYTE value. This
specification can include a pathname and file extension. If the filename includes a
pathname that contains one or more backslash ( \ ) symbols, then you must use a
pair of backslashes ( \\ ) to represent each backslash.
- ariable is the name of a CHAR or VARCHAR variable containing a filename specification.
(This can also be a CHAR or VARCHAR member of a record, or element of an array.)
The TEXT or BYTE variable that stores a large binary value is also called a BLOB (for Binary Large Object). You must specify whether you want to store the
value of the variable in memory or in a file. You can access a value from memory
faster than from a file. If your program exceeds the available memory, however,
4GL automatically stores part of the BLOB value in a file.
To use a BLOB variable, your program must do the following:
- Declare the variable with a DEFINE statement.
- Use the LOCATE statement to specify the storage location. The LOCATE statement
must appear within the scope of reference of the variable.
The List of Large Variables
This comma-separated list specifies the large variable(s) to be initialized:
array is the name of a structured variable of the ARRAY data type.
first is the name of a large member variable to be initialized.
integer is a literal integer between 0 and the declared size of the array.
last is another member of record that was declared later than first.
record is the name of a structured variable of the RECORD data type.
- ariable is the name of a large variable of the TEXT or BYTE data type that was
declared in a previous DEFINE statement.
References
DEFINE
EXIT
FUNCTION
GLOBALS
INITIALIZE
MAIN
REPORT
RETURN