Microsoft KB Archive/43091

From BetaArchive Wiki

COBOL Version 3.0 Call X“B7” Can Hang Using Function 5

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

3.00 3.00a MS-DOS

The information in this article applies to:
- Microsoft COBOL for MS-DOS, versions 3.0 and 3.0a

Summary: Using the special subprogram CALL X“B7” in Microsoft COBOL Versions 3.0 or 3.0a may hang the system if you use Function 5 (clear attributes from the screen) on a blank screen. To prevent the hanging, use this function only when the screen is not blank.

More Information: Executing the following code will hang the machine, only if the DISPLAY statements are removed.

Code Example: WORKING-STORAGE SECTION. 01 FUN PIC 99 COMP-X VALUE 05. 01 PARM. 03 D-LENGTH PIC 9(4) COMP-X VALUE 1600. 03 START-POS PIC 9(4) COMP-X VALUE 241. 03 BUF-START PIC 9(4) COMP-X VALUE 1. 01 BUFF1 PIC X(2000). 01 BUFF2 PIC X(2000). PROCEDURE DIVISION. DISPLAY “*************” AT 0101 WITH HIGHLIGHT. DISPLAY “*************” AT 1010 WITH HIGHLIGHT. DISPLAY “*************” AT 2020 WITH HIGHLIGHT. CALL X“B7” USING FUN, PARM, BUFF1. MOVE 04 TO FUN. CALL X“B7” USING FUN ,PARM, BUFF2. STOP RUN.

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