Microsoft KB Archive/36026

From BetaArchive Wiki

COBOL 3.0 Run-Time Error 139; REBUILD /i and /k

PSS ID Number: Q36026 Article last modified on 04-20-1993

3.00 | 3.00 MS-DOS | OS/2

The information in this article applies to:
- Microsoft COBOL for MS-DOS and OS/2, version 3.0

Summary: In versions of Microsoft COBOL earlier than 3.0, specified keys in the SELECT clause of a program can differ from the keys actually contained in the file, provided the keys in variance are not referenced. When a file is opened in COBOL Version 3.0, it will check if the keys in the file match the description in the SELECT clause. If they differ, a run-time error 139 will be returned. If this occurs, use the REBUILD /i option in COBOL Version 3.0 when converting the data file to get a display of the key structure in the file. Compare this with the key structure defined in the program, and either change the program to match the file, or use REBUILD again on the converted file to rebuild the index, specifying the full key description required for the file. This is done with the REBUILD /k option. This information, along with many other useful tips, is covered in the REBUILD.DOC file, located on the COBOL 3.0 release disk.

Additional reference words: 3.00 Copyright Microsoft Corporation 1993.