Microsoft KB Archive/60134

Long SCREEN SECTION Entries Wrap to Next Line

PSS ID Number: Q60134 Article last modified on 04-03-1990

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

Summary: Any SCREEN SECTION entry that exceeds the length of the line is wrapped onto the next line. The two lines are treated as two subfields of the large field. One effect of this is the following: if both lines contain data, and editing (insertions and deletions) is performed on the first line, the insertion or deletion does not affect the data in the other line(s). This information applies to Microsoft COBOL Compiler Versions 3.00 and 3.00a for MS-DOS and MS OS/2.

More Information: In a multiple-line field, movement is controlled with the LEFT and RIGHT ARROW keys. Except on the last line, when the RIGHT ARROW key is pressed after the last input character – even before the end of the line – the cursor moves to the next line. On the last line, pressing the RIGHT ARROW key after the last input character has no effect (besides sounding the beep). Editing on a multiple-line field can be done with the INS, DEL, and BACKSPACE keys. Because each line is treated as a subfield, editing one line does not affect other lines. For example, consider the sample program below with the first line full and the second line containing some data. In this case, inserting or deleting in the middle of the first line does not change the second line, but only removes or adds those characters to the first line.

Code Example
The following code example contains a 160-character input field, which is treated as two, 80-character subfields: WORKING-STORAGE SECTION. 01 LONG-STR PIC X(160). SCREEN SECTION. 01 LONG-SCREEN. 05 BLANK SCREEN. 05 LINE 1 COLUMN 1 PIC X(160) TO LONG-STR. PROCEDURE DIVISION. MAIN. DISPLAY LONG-SCREEN. ACCEPT LONG-SCREEN. STOP RUN.

Copyright Microsoft Corporation 1990.