11.04.2013 Views

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Parameter Description<br />

Example<br />

In the following example, the program statement writes the variable CHK.WRITE to<br />

the file PAYROLL. All records currently in the output buffer are written to disk along<br />

with this record.<br />

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

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

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

occurs, 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 />

If you specify the ON ERROR clause and UniData cannot find<br />

the end-of-file mark, the ELSE clause executes.<br />

THEN statements END THEN executes if the WRITESEQF is successful. END is<br />

required to terminate multiline THEN statements.<br />

ELSE statements END ELSE executes if the WRITESEQF is not successful or the<br />

record (or ID) does not exist. END is required to terminate<br />

multiline ELSE statements.<br />

WRITESEQF CHK.WRITE ON PAYROLL ELSE GOTO 100:<br />

Related <strong>Commands</strong><br />

<strong>UniBasic</strong><br />

WRITESEQF Parameters (continued)<br />

CLOSESEQ, OPENSEQ, OSBREAD, OSBWRITE, OSCLOSE, OSDELETE,<br />

OSOPEN, READSEQ, WEOFSEQ, WRITESEQ

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

Saved successfully!

Ooh no, something went wrong!