Microsoft KB Archive/31214

Incorrect File Status Reading Indexed File in COBOL 2.1/2.2

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

2.10 2.20 MS-DOS

Summary: When a COBOL Version 2.1 or 2.2 program writes one or more records to an ISAM file, deletes all of the records, and then attempts to READ a record from the file, a file status “30” (Permanent error of file not found) is generated, rather than the expected file status of “23” (Key not found). This problem does not occur if a single record is written, deleted, and re-read (unsuccessfully). Also, if the file is closed and reopened for I/O after all the records are deleted, the READ into the empty file returns a file status “23”. Microsoft has confirmed this to be a problem in Versions 2.1 and 2.2. This problem was corrected in Microsoft COBOL Version 3.0. Microsoft COBOL Versions 2.1 and 2.2 for the XENIX operating system do not exhibit this problem.

Additional reference words: 2.10 2.20 Copyright Microsoft Corporation 1993.