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.

Parameters<br />

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

Parameter Description<br />

STATUS Function Return Values<br />

After you execute READBCK, the STATUS function returns one of the values<br />

described in the following table.<br />

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

dyn.array.var Specifies a dynamic array to which to assign the values read.<br />

FROM file.var Specifies a file variable from which to read the record.<br />

If you do not specify a file.var, UniData reads from the default<br />

file. If no default file is open, a fatal error occurs.<br />

The default file is one for which no file variable is assigned in<br />

the OPEN statement.<br />

ON ERROR statements Specifies statements to execute if the READBCK 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 does not<br />

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

READBCK Parameters<br />

Paramete<br />

r Description<br />

0 Successful read.<br />

10 <strong>UniBasic</strong> found and read a duplicate alternate index key value, and ECL<br />

DUP.STATUS is on.<br />

STATUS Function Return Values

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

Saved successfully!

Ooh no, something went wrong!