UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software UniBasic Commands Reference - Rocket Software

rocketsoftware.com
from rocketsoftware.com More from this publisher
11.04.2013 Views

READNEXTTUPLE Syntax READNEXTTUPLE dyn.array.var FROM file.name.expr {THEN statements [END] | ELSE statements [END]} Description The UniBasic READNEXTTUPLE command assigns the next entire record to a variable. The record ID is obtained from an active select list that was created by a UniData SQL SELECT statement during the current work session. READNEXTTUPLE creates a dynamic array delimited by attribute marks (@AM). The attribute marks are entered by the UniData SQL SELECT statement. Tip: Do not use the UniData SQL UNNEST command in the SQL statement that creates the ID list. UniData might not return the entire record with attribute marks, value marks, and/or subvalue marks if you use UNNEST. 1-632 UniBasic Commands Reference

Parameters The following table describes each parameter of the syntax. Parameter Description dyn.array.var Specifies the dynamic array to contain the record. FROM file.name.expr Specifies the file from which to read the next record ID. file.name.expr must have been created during the current session by: An EXECUTESQL statement with a TO clause in the UniBasic program. A UniData SQL statement executed at the ECL prompt before the program was run. THEN statements END THEN executes if the read is successful. END is required to terminate multiline THEN statements. ELSE statements END ELSE executes if the read is not successful, the record does not exist, or the last record has been read. END is required to terminate multiline ELSE statements. READNEXTTUPLE Parameters READNEXTTUPLE 1-633

Parameters<br />

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

Parameter Description<br />

dyn.array.var Specifies the dynamic array to contain the record.<br />

FROM file.name.expr Specifies the file from which to read the next record ID.<br />

file.name.expr must have been created during the current session<br />

by:<br />

An EXECUTESQL statement with a TO clause in the <strong>UniBasic</strong><br />

program.<br />

A UniData SQL statement executed at the ECL prompt before<br />

the program was run.<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, the record does not<br />

exist, or the last record has been read. END is required to<br />

terminate multiline ELSE statements.<br />

READNEXTTUPLE Parameters<br />

READNEXTTUPLE 1-633

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

Saved successfully!

Ooh no, something went wrong!