Description
The CLEARFILE statement is used to clear all the data from a file previously opened with the OPEN statement. It takes the general form:
CLEARFILE {variable} {SETTING setvar} {ON ERROR statements}
Where:
- The variable is the subject of an OPEN statement before the execution of CLEARFILE upon it.
- If the SETTING clause is specified and the CLEARFILE fails, it sets setvar to one of these values.
Note:
If the variable is omitted from the CLEARFILE statement, it assumes the default file variable as per the OPEN statement.
An example of use is as follows:
OPEN "record_file" TO FILEVAR ELSE ABORT 201, "record_file" CLEARFILE FILEVAR
Go back to jBASE BASIC.