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.

OSBWRITE<br />

Syntax<br />

OSBWRITE expr {ON | TO} file.var [AT byte.expr] [NODELAY] [ON ERROR<br />

statements]<br />

Description<br />

The <strong>UniBasic</strong> OSBWRITE command writes an expression to a sequential file<br />

starting at a specified byte location. OSBWRITE immediately writes a file segment<br />

out to the UNIX, or Windows platform file.<br />

You do not have to specify a length expression because the number of bytes in expr<br />

is written to the file.<br />

Note: Before you use OSBWRITE, you must open the file by using the OSOPEN or<br />

OPENSEQ command.<br />

UniData uses the ASCII 0 character [CHAR(0)] as a string-end delimiter. Therefore,<br />

ASCII 0 cannot be used in any string variable within <strong>UniBasic</strong>. If <strong>UniBasic</strong> reads a<br />

string that contains CHAR(0) characters by using OSBREAD, those characters are<br />

converted to CHAR(128). OSBWRITE converts CHAR(128) back to CHAR(0) when<br />

writing a block of characters.<br />

Writing to Named Pipes<br />

The combination of the following conditions and command options determine the<br />

action taken by <strong>UniBasic</strong> when OSBWRITE is executed against a named pipe:<br />

Presence and length of data in the pipe<br />

Open/closed status of the pipe<br />

Presence or absence of the AT and NODELAY command options<br />

For information about writing applications that access named pipes, see the Developing<br />

<strong>UniBasic</strong> Applications manual.<br />

OSBWRITE 1-550

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

Saved successfully!

Ooh no, something went wrong!