Microsoft KB Archive/37407

Split-Key Error “Continuation Assumed…” Hangs 2.2 Compiler

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

2.10 2.20 MS-DOS

Summary: If the Microsoft COBOL Compiler Version 2.1 or 2.2 detects a split-key definition error at compile time, it will hang after the following error message has been displayed: 0031:/W/Continuation assumed for literal. The code example below demonstrates the problem. If the undefined variable “MISTAKE” is changed to KEY-3, there is no error message and the compiler does not hang. The code example shown below is an expansion of the code on Page 316 of the “Microsoft COBOL Reference Manual” for either the MS-DOS or XENIX operating systems. This error is corrected in Microsoft COBOL Version 3.0. Microsoft COBOL Versions 2.0 and 3.0 trap this split-key definition error correctly. The following is a code example: IDENTIFICATION DIVISION. PROGRAM-ID. SPLITKEY. ENVIRONMENT DIVISION. INPUT-OUTPUT SECTION. FILE-CONTROL. SELECT IN-FILE ASSIGN TO DISK ORGANIZATION IS Indexed access mode is dynamic record key is KEY-PRIME alternate record key is KEY-SECOND with duplicates alternate record key is KEY-3 with duplicates alternate record key is rank-key = KEY-PRIME Mistake. DATA DIVISION. FILE SECTION. FD IN-FILE LABEL RECORDS ARE STANDARD VALUE OF FILE-ID IS “COBDATA.DAT” DATA RECORD IS INPUT-RECORD. 01 INPUT-RECORD. 05 KEY-PRIME PIC X(45). 05 KEY-SECOND PIC X(8). 05 KEY-3 PIC X(10). WORKING-STORAGE SECTION. PROCEDURE DIVISION. STOP RUN.

Additional reference words: 2.10 2.20 Copyright Microsoft Corporation 1993.