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?

STATUS Function

Usage: 

If used after an OPENPATH statement, the STATUS function will find the cause of a file open failure (that is, for a statement in which the ELSE clause is used). The following values can be returned if the statement is unsuccessful:

For the file access commands, READ, WRITE, OPEN, the function returns: 

  • 0 if successful, or an 
  • Operating System error code if previous command failed. 
  • 13 is returned if permission denied on UNIX systems. 


For OCONV conversions, the function returns: 

  • 0 if conversion was successful,
  • 1 if an invalid conversion is requested,
  • 3 if conversion of possible invalid date. 


If used after CLOSE, DELETE, MATREAD, MATWRITE, OPEN, READ or WRITE, STATUS returns 0 if successful and no error occurs. In the event an error occurs, status returns the error number.  

If used after an OPEN, OPENPATH, or OPENSEQ statement, the file type is returned if the file is opened successfully. If the file is not opened successfully, the following values may be returned:

If used after a READ statement, the STATUS function returns, if the file is a distributed file, the following:

If used after a READL, READU, READVL, or READVU statement, if the statement includes the LOCKED clause, the returned value is the terminal number, as returned by the WHO command, of the user who set the lock.

If used after a READSEQ statement,

If used after a READT, REWIND, WEOF, or WRITET statement, the returned value is hardware-dependent (I.e. varies according to the characteristics of the specific tape drive unit). The documentation that accompanied drive unit for may offer information about interpreting the values returned by the STATUS function. 


Go back to jBASE BASIC.

Was this article helpful?