WEOF Statement
Writes an End-Of-File mark (EOF) to tape.
Syntax
WEOF [THEN statement(s) | ELSE statement(s)]
Syntax Element
statement(s) is either a THEN or an ELSE clause (or both). A statement must be included. The THEN clause is executed if the write is successful. The ELSE clause is executed if the tape unit has not been attached.
Comment
If you have not attached the tape (T-ATT command), the system displays the error message:
[1129] NO SUCH TAPE ASSIGNMENT EXISTS
and your program is terminated.
If you want to write to an unlabelled tape you must first
assign/attach the tape using LABEL =0 in the
ASSIGN or
For more information on tape handling, refer to Overview of Tape Operations.
Examples
WEOF ELSE STOP
Writes an EOF mark. If the tape unit is not attached, the program terminates.
WEOF THEN GOTO 100 ELSE PRINT "TAPE NOT ATTACHED" STOP END
Writes an EOF mark and transfers control to statement 100. If the tape is not attached, displays message and terminates program.