Microsoft KB Archive/31070

Compiling Table Used Twice in WORKING-STORAGE Hangs on SEARCH

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

2.10 2.20 MS-DOS

Summary: If the name of a table (i.e., an array) to be SEARCHed occurs more than once in the WORKING-STORAGE SECTION and is not qualified in the SEARCH statement, the compiler hangs the machine after reading the source file without generating an error message. This is a known problem in Versions 2.1 and 2.2. The problem has been fixed in version 3.0. The error is flagged during compilation. The following are two workarounds for this problem: 1. Use a unique variable name. 2. Qualify the table/array reference as shown below.

More Information: The following example will hang the computer at compile time: 01 ITEM1 03 TABLE OCCURS 100 TIMES INDEXED BY IDX. 01 ITEM2 03 TABLE OCCURS 100 TIMES. . . . SEARCH TABLE AT END PERFORM END-RTN. To compile successfully, change the SEARCH statement in the example above to the following: SEARCH TABLE OF ITEM1 AT END PERFORM END-RTN

Additional reference words: 2.10 2.20 Copyright Microsoft Corporation 1993.