Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
Key (↑ File Status Codes)
◄Back► ◄Up► ◄Contents► ◄Index► ◄Back►
────────────────────────────────────────────────────────────────────────────
ANSI'85 File Status
If you are using the standard system loaded for ANSI'85
operation, then ANSI'85 codes are produced by default. If the -A
switch is used at run-time with a program compiled for ANSI'85
operation, then ANSI'74 file status codes are produced.
ANSI'74 File Status
If you compile your program with the directive, NOANS85, then
ANSI'74 file status codes are produced. If you do not specify
NOANS85 when compiling, then ANSI'85 file status codes are produced.
If you wish to use ANSI'85 syntax, but have ANSI'74 file status
codes, then replace the NOANS85 directive with ANS85(SYNTAX), or
remove the NOANS85 directive and use the -A switch at run-time.
Extended File Status
The ANSI'74 and ANSI'85 file status conventions described above are
augmented with more detailed extended file status codes. Extended
file status codes have the character "9" as the first byte of the
file status. The second byte is a binary (COMP-X) number, which is
equivalent to a run-time error number. These are written as 9/nnn
where nnn is the binary number in the second byte. Run-time errors
are documented in your Error Messages Manual.
For example, if you are writing a file to disk and the disk runs out
of space, the ANSI'74 file status would be a "30", which translates
into a "Permanent error - no other information is available" error
message. That error message is very general; a "permanent error"
could mean that the disk has failed, or that the disk drive door is
open. So, rather than return a generic file status, this COBOL
system returns an extended file status of 9/007 (i.e. the character,
"9", in the first byte, and binary 7 in the second) meaning "disk
full".
When using ANSI'74 or ANSI'85 file status codes, the run-time system
returns extended status codes if the extended file status is more
specific than what would normally be returned.
Note:
Unless otherwise specified, each file status code can be received
for operations on any file organizations in any access mode.
-♦-