Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms
11.2 Designing Video Forms with ACCEPT and DISPLAY Statement Extensions
Example 11–10 (Cont.) Using the CONTROL KEY IN Phrase
DISPLAY "Not an allowable control key -"
"press the Return key to continue"
LINE 10 COLUMN 5
WITH BELL ERASE LINE.
ACCEPT CONTROL-KEY.
GO TO P1.
P2.
DISPLAY "Press the Return key to end this job"
LINE 11 COLUMN 5 ERASE LINE.
ACCEPT CONTROL KEY IN CONTROL-KEY LINE 12 COLUMN 5 ERASE LINE.
IF NOT CR GO TO P0
ELSE
DISPLAY "END OF JOB" LINE 13 COLUMN 35
BOLD BLINKING REVERSED BELL
ERASE SCREEN.
P3.
* DISPLAY ESC ">" WITH NO puts you out of alternate keypad mode
*
DISPLAY ESC ">" WITH NO.
STOP RUN.
Figure 11–12 shows a sample run of the program in Example 11–10 using the
right arrow terminal key.
To expand upon Example 11–10, you can, for example, accept data in addition
to specifying the CONTROL KEY phrase. This enables you to accept data and
determine what to do next based on the data. You can use the CONTROL KEY
phrase to move the cursor around on the screen or take a specific course of
action.
Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms 11–27
Содержание COBOL AAQ2G1FTK
Страница 22: ......
Страница 30: ......
Страница 94: ......
Страница 110: ......
Страница 146: ......
Страница 180: ......
Страница 194: ...Processing Files and Records 6 1 Defi...
Страница 300: ......
Страница 490: ......
Страница 516: ......
Страница 517: ......
Страница 530: ......
Страница 534: ......
Страница 590: ......
Страница 620: ......