Welcome to jBASE's new documentation site! Many answers to your questions can be found by searching the Knowledgebase or viewing the jBASE Documentation. We also have a Google Group for peer discussion about jBASE. If you are unable to find the information you are looking for, jBASE Support will be glad to assist in resolving your technical problems. Enjoy and please provide comments and feedback .

How can we help you?



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}


  • 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


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"

Go back to jBASE BASIC.

Was this article helpful?