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.

Example<br />

In the following example, the program segment first uses the ECL T.ATT command<br />

to reserve tape unit 0 and specifies no conversion code. Then a routine reads all the<br />

records on the tape (until the end of the file or tape) and calls an internal subroutine<br />

that processes the record. After the process is finished, the REWIND command<br />

rewinds the tape.<br />

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

PERFORM "T.ATT DO"<br />

DONE = 0<br />

LOOP<br />

READT UNIT (00) TAX.RECORD ELSE DONE = 1<br />

UNTIL DONE DO<br />

GOSUB PROCESS.RECORD<br />

REPEAT REWIND UNIT (00) ELSE PRINT 'REWIND UNSUCCESSFUL'<br />

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

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

READT, RESIZET, WRITET<br />

UniData<br />

SETTAPE, T.ATT, T.DET – For information, see the UniData <strong>Commands</strong> <strong>Reference</strong>.

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

Saved successfully!

Ooh no, something went wrong!