STATUS - file system status.
Description:
A file system status return is a two-word array which holds
the status return value of the most recent file system service
call. In B system functions, the file system status value is
contained in an external variable named F.STAT (see "expl b syslib externals").
First Word:
The first word uses bits in the following way.
- Bit 0
- is always on (indicating that the file system service
call has completed).
- Bits 1-11
- contains the FMS status value. A value of 0 indicates
success. Any other value indicates failure. A non-zero
value may be used as an index into the vector FLSYERR to
obtain a suitable error message for the failure -- see
"expl b lib
external flsyerr".
- Bits 12-35
- contain a value providing more error information. The
nature of the value depends on the nature of the FMS call
that was being used. See the FMS manual for more
information.
Second Word:
If an error occurs, the second word will be zero, or else it
will contain:
- A pointer to a BCD error message (in its upper half).
- The length of the BCD error message, in words (in its
lower half).
The standard technique for printing this message (in B) is
printf("%?b", (F.STAT[1] & 07777)*6, F.STAT[1]>>18);
If the FMS function was "access file", and no error
occurred, then the second status word will contain:
- Bit 0
- This bit will be non-zero, if the file has ever been
written to.
- Bits 1-35
- 35 bits of "user specified information" which
may be interpreted by the program using the file.
Copyright © 1996, Thinkage Ltd.