Microsoft KB Archive/32155

Description of File Status Variables

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

3.00 3.00a 4.00 4.50 | 3.00 3.00a 4.00 4.50 MS-DOS | OS/2

Summary: Microsoft COBOL Version 3.0, 3.0a, 4.0, 4.5 have a different interpretation of file status values than any of the previous versions. The file status variable is still 2 bytes of alphanumeric data; however, each byte has a distinct meaning. The leftmost (ASCII) byte can be interpreted as follows: “0” - Successful completion “1” - AT END “2” = Invalid key “3” = Permanent error “4” = Logic error “9” = Runtime system error message Acceptable values for the rightmost byte are: Successful completion - ASCII - 0 (i.e., 00 &quot; 2 02 &quot; 4 04 &quot; 5 05 &quot; 7 07) Invalid key - ASCII - 0 (i.e., 10 &quot; 4 14) Permanent error - ASCII - 0 (i.e., 20 &quot; 4 24 &quot; 5 25 &quot; 7 27 &quot; 8 28 &quot; 9 29) Logic error - ASCII - 1 (i.e, 41 &quot; 2 42 &quot; 3 43 &quot; 4 44 &quot; 6 46 &quot; 7 47 &quot; 8 48 &quot; 9 49) Run-time system error message - BINARY - 001 through 0FF

More Information: Information on Successful completion, Invalid key, Permanent error, and Logic error byte values are discussed in detail on Pages 5-5 through 5-13 of the “Microsoft COBOL Language Reference Manual” for Version 3.0. Run-time system error binary values are discussed on Pages 4-6 through 4-45 of the Microsoft COBOL Operating Guide, Error Messages, Run-Time System Messages for Version 3.0.

Additional reference words: 3.00 3.00a 4.00 4.50 Copyright Microsoft Corporation 1993.