Microsoft KB Archive/33221

Version 3.0 Returns ANSI ’85 File Status Values

PSS ID Number: Q33221 Article last modified on 04-21-1993

3.00 | 3.00 MS-DOS | OS/2

Summary: Below is a table of ANSI ’85 COBOL file status values which are returned in Microsoft COBOL Version 3.0.

More Information: +——-+————+———-+———+————————+ | VALUE | Sequential | Relative | Indexed | Description | +——-+————+———-+———+————————+ | SUCCESSFUL COMPLETION STATUS | +——-+————+———-+———+————————+ | 00 | * | * | * | Successful completion | | | | | | | | 02 | | | * | Duplicate Alternate Key| | | | | | detected or created | | | | | | | | 04 | * | * | * | Successful READ, but | | | | | | length indicators | | | | | | are not the same | | | | | | | | 05 | * | * | * | OPEN executed; optional| | | | | | file not present; | | | | | | created if opened I/O | | | | | | or open EXTEND | | | | | | | | 07 | * | | | Successful, but not on | | | | | | tape, so tape options | | | | | | are ignored | +——-+————+———-+———+————————+ | AT END WITH UNSUCCESSFUL COMPLETION STATUS | +——-+————+———-+———+————————+ | | | | | | | 10 | * | * | * | End of file on | | | | | | Sequential READ; | | | | | | optional file not | | | | | | present | | | | | | | | 14 | | * | | Boundary violation on | | | | | | Relative file | +——-+————+———-+———+————————+ | INVALID KEY WITH SUCCESSFUL COMPLETION STATUS | +——-+————+———-+———+————————+ | 21 | | | * | Sequence error; record | | | | | | in Indexed file is | | | | | | out of sequence | | | | | | | | 22 | | * | * | Duplicate key condition| | | | | | | | 23 | | * | * | Record not found | | | | | | | | 24 | | * | * | Boundary violation on | | | | | | Indexed file | +——-+————+———-+———+————————+ | PERMANENT ERROR WITH SUCCESSFUL COMPLETION STATUS | +——-+————+———-+———+————————+ | 30 | * | * | * | Permanent error | | | | | | | | 34 | * | | | Boundary violation on | | | | | | Sequential file | | | | | | | | 35 | * | * | * | OPEN I/O, INPUT or | | | | | | EXTEND; non-optional | | | | | | file not present | | | | | | | | 37 | * | * | * | OPEN for the file that | | | | | | that won’t support | | | | | | the specified option | | | | | | | | 38 | * | * | * | OPEN when the file was | | | | | | previously closed | | | | | | with LOCK | | | | | | | | 39 | * | * | * | OPEN with a file | | | | | | attribute conflict | +——-+————+———-+———+————————+ | LOGIC ERROR WITH UNSUCCESSFUL COMPLETION STATUS | +——-+————+———-+———+————————+ | 41 | * | * | * | OPEN with the file | | | | | | already open | | | | | | | | 42 | * | * | * | CLOSE with unopen file | | | | | | | | 43 | * | * | * | REWRITE or DELETE; last| | | | | | I/O not a successful | | | | | | READ | | | | | | | | 44 | * | * | * | Boundary violation | | | | | | | | 46 | * | * | * | Sequential READ not | | | | | | valid because there | | | | | | is no next record | | | | | | | | 47 | * | * | * | READ or START on a file| | | | | | not opened in a valid | | | | | | mode | | | | | | | | 48 | * | * | * | WRITE on a file not | | | | | | opened in a valid mode| | | | | | | | 49 | * | * | * | REWRITE or DELETE on a | | | | | | file not opened in a | | | | | | valid mode | +——-+————+———-+———+————————+

Additional reference words: 3.00 Copyright Microsoft Corporation 1993.