MPE/iX Intrinsics Reference Manual (32650-90875)

288 Chapter6
Command Definitions (FLUSHLOG-GETUSERMODE)
FWRITE
indicator is advanced. However, this is noted in the file label only when the file is closed or
when an extent is allocated. If the physical bounds of the file are reached, CCG (0) is
returned.
If a magnetic tape is unlabeled (as specified in the FOPEN/HPFOPEN intrinsic, or in the FILE
command) and the program attempts to write over or beyond the physical or simulated
end-of-tape (EOT) marker, the FWRITE intrinsic returns CCL (1). The actual data is written
to the tape, and a call to FCHECK reveals an end-of-tape file error. After the EOT marker is
crossed, all writes to the tape transfer the data successfully but return CCL (1) until the
tape crosses the EOT marker again in the reverse direction (rewind or backspace).
If a magnetic tape is labeled (as specified in the FOPEN/HPFOPEN intrinsic, or in the FILE
command), CCL (1) is not returned when the tape passes the EOT marker. Attempts to
write to the tape after an EOT marker cause end-of-volume (EOV) markers to be written.
A message is printed on the system console requesting another volume (reel of tape) be
mounted.
For message files and circular files, this intrinsic logically appends the record to the end of
the file. If a circular file is full, the first block is deleted, the remaining blocks are logically
shifted to the file's head, and the new record is appended to the end of the file. If a message
file is full and there are no readers, the process waits if there is an FCONTROL=45 in effect
or if this is the first FWRITE after an FOPEN/HPFOPEN call. Otherwise, CCG (0) is returned.
Control codes are ignored for byte stream files. Byte stream files can not be opened with
carriage control.
Condition Codes
CCE (2) Request granted.
CCG (0) Request denied. The physical bounds of the file prevented further writing.
CCL (1) Request denied. An error occurred;
length
exceeded the size of the record
in nonmultirecord mode, the FSETMODE option was enabled to signify
recovered tape errors, or the end-of-tape marker was sensed. If the file is
being written to a multivolume labeled magnetic tape set, CCL (1) is not
returned when the end-of-tape marker is sensed. Instead, end-of-volume
labels are written, and a request is issued to mount the next volume.
Related Information
Manual Accessing Files Programmer's Guide