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 -"
ACCEPT CONTROL-KEY.
GO TO P1.
P2.
DISPLAY "Press the Return key to end this job"
ACCEPT CONTROL KEY IN CONTROL-KEY LINE 12 COLUMN 5 ERASE LINE.
IF NOT CR GO TO P0
ELSE
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
"press the Return key to continue"
LINE 10 COLUMN 5
WITH BELL ERASE LINE.
LINE 11 COLUMN 5 ERASE LINE.
DISPLAY "END OF JOB" LINE 13 COLUMN 35
BOLD BLINKING REVERSED BELL
ERASE SCREEN.
Need help?
Do you have a question about the COBOL AAQ2G1FTK and is the answer not in the manual?