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

Parameters The following table describes each parameter of the syntax. Parameter Description Multireel Tape Processing You must use the TAPELEN option for the T.ATT command and specify the tape length. This command is intended for use with UniData tapes only. For information about the ECL T.ATT command, see the UniData Commands Reference. 1-915 UniBasic Commands Reference UNIT(mu.expr) Specifies the conversion code (first digit) and the unit number (second digit). Unit numbers range from 0 through 9. The mu.expr is optional and the default value for UNIT is (00) for tape unit 0 with no conversion performed (ASCII assumed). Valid options include the following: 0 – No conversion (ASCII assumed). 1 – EBCDIC conversion. 2 – Invert high bit. 3 – Swap bytes. expr Specifies an expression to write. THEN statements END THEN executes if command execution is successful. END is required to terminate multiline THEN statements. ELSE statements END ELSE executes if command execution is not successful or the record (or ID) does not exist. END is required to terminate multiline ELSE statements. WRITET Parameters

STATUS Function Return Values After you execute WRITET, the STATUS function returns one of the values described in the following table. Example In the following example, the T.ATT command is executed, and then UniData writes the variable TAX.RECORD to tape: PERFORM "T.ATT" WRITET UNIT (00) TAX.RECORD ELSE PRINT 'TAPE PROBLEM' Related Commands UniBasic READT, RESIZET, REWIND, WEOF UniData Value Description 0 Successful read. 1 End of file encountered. 2 End of tape encountered. 3 Tape not assigned. 4 Parity error. 5 Unknown hardware error. 6 Other unspecified error. STATUS Function Return Values SETTAPE, T.ATT, T.DET – For information, see the UniData Commands Reference. WRITET 1-916

Parameters<br />

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

Parameter Description<br />

Multireel Tape Processing<br />

You must use the TAPELEN option for the T.ATT command and specify the tape<br />

length. This command is intended for use with UniData tapes only. For information<br />

about the ECL T.ATT command, see the UniData <strong>Commands</strong> <strong>Reference</strong>.<br />

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

UNIT(mu.expr) Specifies the conversion code (first digit) and the unit number<br />

(second digit). Unit numbers range from 0 through 9.<br />

The mu.expr is optional and the default value for UNIT is (00)<br />

for tape unit 0 with no conversion performed (ASCII assumed).<br />

Valid options include the following:<br />

0 – No conversion (ASCII assumed).<br />

1 – EBCDIC conversion.<br />

2 – Invert high bit.<br />

3 – Swap bytes.<br />

expr Specifies an expression to write.<br />

THEN statements END THEN executes if command execution is successful. END is<br />

required to terminate multiline THEN statements.<br />

ELSE statements END ELSE executes if command execution is not successful or the<br />

record (or ID) does not exist. END is required to terminate<br />

multiline ELSE statements.<br />

WRITET Parameters

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

Saved successfully!

Ooh no, something went wrong!