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 statement allows for reading from a file opened for sequential access. It takes the general form: 

READSEQ Variable FROM filevar THEN | ELSE statements


  • Variable specifies the variable to contain next record from sequential file.
  • filevar specifies the file descriptor of the file opened for sequential access.
  • Statements Conditional jBASE BASIC statements

Each READSEQ reads a line of data from the sequentially opened file. After each READSEQ, the file pointer moves forward to the next line of data. The variable contains the line of data less the new line character from the sequential file.

The default buffer size for a READSEQ is 1024 bytes. This can be changed using the IOCTL function with the JIOCTL_COMMAND_SEQ_CHANGE_RECORDSIZE defined in the Sequential File Extensions.

An example of use would be as: 

OPENSEQ ".", "report.txt" TO FILE_VAR ELSE ABORT 201, "report file"

to open a "report file" and read the first line from it.

Go back to jBASE BASIC.

Was this article helpful?