HP 3000 Manuals

Ch 5. File Status Codes [ COBOL/HP-UX Error Messages for the Series 700 and 800 ] MPE/iX 5.0 Documentation


COBOL/HP-UX Error Messages for the Series 700 and 800

Chapter 5  File Status Codes 

Introduction 

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, then 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, 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.

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:

9/nnn

where:

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

Run-time errors are documented in Chapter 4  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