COBOL Manual for TNS/E Programs (H06.03+)

Libraries and Utility Routines
HP COBOL Manual for TNS/E Programs520347-003
13-61
COBOL_SPECIAL_OPEN_
return-code
is an identifier of a numeric data item in which an error value will be returned. The
expected values and their respective meanings are:
When the COBOL85_SPECIAL_OPEN_ routine with an open-type of 3 has performed
a successful open operation, the special register GUARDIAN-ERR contains the value
3 (failure to open a partition) if the operating environment reports that file code. In this
case, the I-O status code is “00.”
If a subsequent input-output statement attempts to make reference to a logical record
which resides in an unavailable partition of the file, the HP COBOL run-time routines
assign a value of 72 (attempt to access unmounted partition) to the special register
GUARDIAN-ERR, because that is the file code reported by the operating environment.
The I-O status code in this case is “30” (COBOL permanent error). This, in turn, causes
the run-time routines to abnormally terminate the execution of the run unit, unless an
applicable Declarative procedure is specified in the Procedure Division of the program
unit that contains the statement whose execution failed.
Value Meaning
0 Successful execution
1 file-name is missing or is invalid, or an extraneous parameter is present.
2 The value of the open-type, exclusion, or sync-depth parameter is
invalid.
4The device-type of the file specified is not compatible with the value
specified for open-type.
5 An operation error occurred (for example, the file could not be opened).