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.

CLOSESEQ<br />

Syntax<br />

CLOSESEQ seq.file.var [ON ERROR statements]<br />

Description<br />

The <strong>UniBasic</strong> CLOSESEQ command closes a sequential file that you opened with<br />

the OPENSEQ or OSOPEN command. The CLOSESEQ command releases the<br />

exclusive file lock set by the OPENSEQ command. If any new lines (sequential<br />

records) were added to the file, UniData writes a new end-of-file mark after the new<br />

lines.<br />

Parameters<br />

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

Parameter Description<br />

Example<br />

In the following example, the statement closes the sequential file referred to by the<br />

file variable DATA.59:<br />

CLOSESEQ DATA.59<br />

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

seq.file.var Specifies a sequential access file to close.<br />

The file must have been opened previously with an OPENSEQ<br />

or OSOPEN statement.<br />

ON ERROR statements Specifies statements to execute if a fatal error occurs because<br />

the file is not open.<br />

If you do not specify the ON ERROR clause, the program<br />

terminates under such fatal error conditions.<br />

CLOSESEQ Parameters

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

Saved successfully!

Ooh no, something went wrong!