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.

In the next example, the program selects all Canadian clients, and then executes<br />

READNEXT to read and display the records for the first 22:<br />

EXECUTE 'SELECT CLIENTS WITH COUNTRY = "Canada"'<br />

EXECUTE "SAVE.LIST 'canadians'"<br />

OPEN 'CLIENTS' TO CLIENT.FILE ELSE ABORT<br />

GETLIST 'canadians' SETTING LIST.CNT<br />

ELSE PRINT CLIENT:" SAVELISTS ID ‘canadians’ CANNOT BE<br />

FOUND";STOP<br />

PRINT @(-1)<br />

FOR I = 1 TO 22<br />

READNEXT ID ELSE EXIT<br />

READ REC FROM CLIENT.FILE, ID THEN<br />

PRINT @(5,I):REC:@(20,I):REC<br />

END ELSE<br />

PRINT "CANNOT FIND RECORD":ID<br />

END<br />

NEXT I<br />

CLEARSELECT<br />

END<br />

Related <strong>Commands</strong><br />

<strong>UniBasic</strong><br />

DELETELIST, FORMLIST, GETLIST, READLIST, SELECT, SELECTINDEX,<br />

SELECTINFO, WRITELIST<br />

UniQuery<br />

DELETE.LIST, GET.LIST, SAVE.LIST, SELECT, SSELECT – For information, see<br />

the UniQuery <strong>Commands</strong> <strong>Reference</strong>.<br />

UniData SQL<br />

SELECT – For information, see the UniData SQL <strong>Commands</strong> <strong>Reference</strong>.<br />

READNEXT 1-631

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

Saved successfully!

Ooh no, something went wrong!