Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms
11.2 Designing Video Forms with ACCEPT and DISPLAY Statement Extensions
•
ERASE LINE—Erase the entire specified line before accepting or displaying
data at the specified or implied cursor position.
•
ERASE TO END OF SCREEN—Erase from the specified or implied cursor
position to the end of the screen before accepting or displaying data at the
specified cursor position.
•
ERASE TO END OF LINE—Erase from the specified or implied cursor
position to the end of the line before accepting or displaying data at the
specified cursor position.
These options all work with either absolute or relative cursor positioning. (See
Section 11.2.2.)
Note
On OpenVMS, for any application that displays or accepts information
from a terminal, use the SET TERMINAL/NOBROADCAST command
before you start the application. This command prevents broadcast
messages (such as notifications of new mail) from interrupting the screen
displays.
♦
In Example 11–1, an introductory message is first displayed on the screen (along
with a prompt to the user). Then the ERASE SCREEN option causes the entire
screen to be erased before "Employee number:" is displayed. Figure 11–2 shows
how the screen looks after the ERASE statement executes.
Example 11–1 Erasing a Screen
IDENTIFICATION DIVISION.
PROGRAM-ID.
ERASEIT.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 ANY-CHAR
PIC X.
PROCEDURE DIVISION.
A00-BEGIN.
DISPLAY "EMPLOYEE ACCESS SYSTEM" LINE 8 COLUMN 30.
DISPLAY "Type any character to begin." LINE 20 COLUMN 10.
ACCEPT ANY-CHAR.
A10-EN-SCREEN.
DISPLAY "Employee number:" LINE 4 COLUMN 4 ERASE SCREEN.
DISPLAY " " LINE 23 COLUMN 1.
STOP RUN.
11.2.2 Horizontal and Vertical Positioning of the Cursor
To position data items at a specified line and column, use the LINE NUMBER
and COLUMN NUMBER phrases. You can use these phrases with both the
ACCEPT and DISPLAY statements. You can use literals or numeric data items
to specify line and column numbers.
Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms 11–5
Содержание COBOL AAQ2G1FTK
Страница 22: ......
Страница 30: ......
Страница 94: ......
Страница 110: ......
Страница 146: ......
Страница 180: ......
Страница 194: ...Processing Files and Records 6 1 Defi...
Страница 300: ......
Страница 490: ......
Страница 516: ......
Страница 517: ......
Страница 530: ......
Страница 534: ......
Страница 590: ......
Страница 620: ......