HP 3000 Manuals

Ch 5. File Status Codes [ Micro Focus COBOL Error Messages ] MPE/iX 5.0 Documentation


Micro Focus COBOL Error Messages

Chapter 5  File Status Codes 

For each file defined with a FILE STATUS clause, every I/O operation
returns a status code.  This chapter lists the codes that can be
returned.  If you are using the standard system loaded for ANSI'85
operation, ANSI'85 codes are produced by default.  In order to produce
ANSI'74 file status codes, set the -A switch at run time.

Alternatively, compile your program with the directive NOANS85.  If you
do not specify NOANS85 when compiling, ANSI'85 file status codes are
produced.

If you want to use ANSI'85 syntax, but have ANSI'74 file status codes,
replace the NOANS85 directive with ANS85"SYNTAX", or remove the NOANS85
directive and use the -A switch at run time.

In addition to the above file status conventions you can produce more
detailed extended file status codes.  Extended file status codes have the
following format:

nnn 

where:

nnn                   is a binary (COMP-X) number, equivalent to a 
                      run-time error number. 

Run-time errors are documented in the chapter Run-time System Messages.

For example, if you are writing a file to disk and the disk runs out of
space, the ANSI'74 file status would be "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.

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.

Unless otherwise specified, each file status code can be received for
operations on any file organizations in any access mode.



MPE/iX 5.0 Documentation