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

ON ERROR statements Specifies statements to execute if the MATREADL 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 />

LOCKED statements Specifies statements to execute if the record is locked by another<br />

user. If you do not specify a LOCKED clause, the program waits<br />

until UniData releases the lock on the record. You can place the<br />

LOCKED clause after the FROM clause.<br />

Use the ECL command DEFAULT.LOCKED.ACTION BELL<br />

to make the terminal beep while you wait for UniData to unlock<br />

the record.<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 />

INMAT Function Return Values<br />

After you execute MATREADL, the INMAT function returns one of the values<br />

described in the following table.<br />

Value Description<br />

MATREADL Parameters (continued)<br />

n The number of attributes loaded into the array.<br />

0 The array was too small to contain all attributes in the record. The excess data<br />

(including delimiters) is placed in the zero element.<br />

INMAT Function Return Values<br />

Note: BASICTYPEs P and R do not support the 0,0 element. If UniData reads more<br />

attributes from the file than it can place in the dimensioned array, a runtime error<br />

results and data is lost.<br />

MATREADL 1-453

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

Saved successfully!

Ooh no, something went wrong!