11.04.2013 Views

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Parameters<br />

The following table describes each parameter of the syntax.<br />

Parameter Description<br />

1-559 <strong>UniBasic</strong> <strong>Commands</strong> <strong>Reference</strong><br />

filename Specifies the file to open. filename must include the entire path<br />

name unless the file resides in the current directory.<br />

READONLY Directs UniData to open the file for reading only. If the program<br />

attempts to write to a file opened in READONLY mode,<br />

UniData displays a runtime error message and does not update<br />

the file. For information about security procedures, see<br />

Administering UniData on UNIX or Administering UniData on<br />

Windows Platforms.<br />

WRITEONLY Specifies that the pipe or file is open for write access only.<br />

TO file.var Specifies a variable to contain a pointer to the file.<br />

NODELAY Forces a pipe to be opened immediately. This enables a process<br />

to continue even when the pipe is not open in the opposite access<br />

mode. The application must then manage access to the pipe to<br />

ensure that it is opened for the opposite process before reading<br />

from or writing to it.<br />

If filename is not a named pipe, NODELAY has no effect.<br />

ON ERROR statements Specifies statements to execute if the OSOPEN statement fails<br />

with a fatal error because the file is not open, an I/O error occurs,<br />

or UniData cannot find the file.<br />

If you do not specify the ON ERROR clause and a fatal error<br />

occurs, the program terminates.<br />

THEN statements END THEN executes if the read is successful. END is required to<br />

terminate multiline THEN statements.<br />

ELSE statements END ELSE executes if the read is not successful or the record (or ID)<br />

does not exist. END is required to terminate multiline ELSE<br />

statements.<br />

OSOPEN Parameters

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!