COBOL Manual for TNS and TNS/R Programs
Procedure Division
HP COBOL Manual for TNS and TNS/R Programs—522555-006
8-35
Diagnosing Input-Output Errors
Table 8-12. I-O Status Codes Augmented by GUARDIAN-ERR (page1of5)
Status
Code
GUARDIAN-ERR 
Value COBOL Statement(s) Cause of Status Code
“00” 0 All Operation was successful
6 READ sequential Read from $RECEIVE and system 
message was read. Operation was 
still successful
“04” 0 READ Record on file shorter than 
expected
“05” 11 OPEN Open for INPUT, I-O, or EXTEND—
OPTIONAL specified and file does 
not exist
14 OPEN Open for INPUT, I-O, or EXTEND—
OPTIONAL specified and device 
does not exist for a temporary file
“07” 0 OPEN Insufficient memory for HP COBOL 
Fast I-O
0 CLOSE NO REWIND, 
OPEN NO REWIND
NO REWIND on a device that is not 
a tape
0 CLOSE REEL REEL/UNIT on a device that is not 
a tape
“10” 1 READ sequential End of file
“21” 0 WRITE (indexed file) Sequence violation
11 REWRITE with 
sequential access
Record does not exist
23 REWRITE with 
sequential access
Relative key out of bounds
46 REWRITE with 
sequential access
Invalid key specified
“22” 10 REWRITE Alternate key without duplicates 
already exists
10 WRITE Record already exists
xxx = Whatever file-system error is returned










