Welcome to jBASE's new documentation site! Many answers to your questions can be found by searching the Knowledgebase or viewing the jBASE Documentation. We also have a Google Group for peer discussion about jBASE. If you are unable to find the information you are looking for, jBASE Support will be glad to assist in resolving your technical problems. Enjoy and please provide comments and feedback .

How can we help you?

WRITET

Description

The WRITET statement enables data to be written to a range of tape devices between 0-9.

WRITET variable {ON|TO expression} THEN|ELSE statements

Where:

variable is the variable that holds the data to be written to the tape device.

expression should evaluate to an integer value in the range 0-9 and specifies from which tape channel to read the data. If the ON clause is not specified the WRITET will assume channel 0.

If the WRITET fails then the statements associated with any ELSE clause will be executed.

SYSTEM(0) will return the reason for the failure as follows:

1
there is no media attached to the channel
2
end of media found

Note:

  • A "tape" does not refer to magnetic tape devices only but any device that has been described to jBASE.
  • Writing device descriptors for jBASE is beyond the scope of this documentation.
  • If no tape device has been assigned to the specified channel the jBASE debugger is entered with an appropriate message.

Where possible the record size is not limited to a single tape block and the entire record will be written blocked to whatever block size has been allocated by the T-ATT command. However, certain devices do not allow jBASE to accomplish this (SCSI tape devices for instance).

An example of use is as: 

LOOP
    WRITET TapeRec ON 5 ELSE
        Reason = SYSTEM(0)
    IF Reason = 2 THEN BREAK ;* done
        CRT "ERROR"; STOP
    END
REPEAT


Go back to jBASE BASIC.

Was this article helpful?