Microsoft KB Archive/39249

COBOL 3.0 Program Can’t DISPLAY Past Line 25 in 43-Line Mode

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

3.00 3.00a | 3.00 3.00a MS-DOS | OS/2

Summary: Microsoft COBOL Versions 3.0 and 3.0a cannot DISPLAY SCREEN SECTION information or WORKING-STORAGE information below LINE 25, when in 43-line mode. This feature is currently not supported by Microsoft COBOL. A full screen or SCREEN SECTION DISPLAY will not print text beyond line 25. A format 2 DISPLAY will print text on line 25 and then scroll the screen when lines greater than 25 are displayed. The Compiler does not check for valid screen coordinate ranges in the SCREEN SECTION or in DISPLAY statements. The code example below demonstrates this limitation.

More Information: Microsoft COBOL Versions 2.0, 2.1 and 2.2 also do not support 43-line mode. In previous versions, the Compiler did not check for valid screen coordinate ranges. However, a “Cursor-position” run-time error was generated when coordinates beyond the screen range were requested. Additional information on the format 2 DISPLAY statement can be found in the “Microsoft COBOL Compiler 3.0: Language Reference Manual” on Page 15-55. The following is a code example which can be compiled and LINKed accepting the defaults: IDENTIFICATION DIVISION. PROGRAM-ID. TEST-THIS. DATA DIVISION. WORKING-STORAGE SECTION. SCREEN SECTION. 01 SHOW-ME. 03 LINE 35 COLUMN 20 VALUE “Howdy friends!”. PROCEDURE DIVISION. 000-MAIN. DISPLAY (24, 10) “Here I am”. DISPLAY SHOW-ME. DISPLAY (33, 10) “Here I go”. STOP RUN.

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