Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms
11.3 Designing Video Forms with Screen Section ACCEPT and DISPLAY
Example 11–12 (Cont.) Designing a Video Form for a Daily Calendar
*
Normal termination of the ACCEPT statement will result in a value
*
of '0' in KEY1. When the user presses F10, the value in KEY1 will
*
be '1' and FKEY-10 will be true.
01 CRT-STATUS.
03 KEY1
03 KEY2
88 FKEY-10
03 filler
*
The following data items are for a "Daily Calendar." It shows
*
the day's appointments and allows appointments to be made,
*
canceled, and printed.
01 ACCEPT-ITEM1 PIC X.
01 APPT-NAME
01 APPT-DAY
01 APPT-MONTH
01 APPT-YEAR
01 APPT-HOUR
01 APPT-MINUTE
01 APPT-MERIDIEM PIC XX.
01 APPT-VERIFY
01 EMPTY-LINE
*
The SCREEN SECTION designs the Daily Calendar, with a menu
*
screen from which the user selects an option: to show
*
appointments, schedule an appointment, cancel an appointment,
*
and print the appointments.
SCREEN SECTION.
01 MENU-SCREEN BLANK SCREEN FOREGROUND-COLOR 7 BACKGROUND-COLOR 1.
02 MENU-SCREEN-2.
03 TITLE-BAR
FOREGROUND-COLOR 7 BACKGROUND-COLOR 4.
04 LINE 1 PIC X(80) FROM EMPTY-LINE.
04 LINE 1 COLUMN 32 VALUE "Daily Calendar".
03 LINE 7 COLUMN 26
PIC X TO ACCEPT-ITEM1.
03 VALUE " Show appointments for a day ".
03 LINE 9 COLUMN 26
PIC X TO ACCEPT-ITEM1.
03 VALUE " Schedule an appointment ".
03 LINE 11 COLUMN 26
PIC X TO ACCEPT-ITEM1.
03 VALUE " Cancel an appointment ".
03 LINE 13 COLUMN 26
PIC X TO ACCEPT-ITEM1.
03 VALUE " Print your appointments ".
03 HELP-TEXT
FOREGROUND-COLOR 6 BACKGROUND-COLOR 0.
04 LINE 19 COLUMN 12
VALUE
" Use the arrow keys to move the cursor among menu items. ".
04 LINE 20 COLUMN 12
VALUE
" Press <Return> when the cursor is at the desired item. ".
04 LINE 21 COLUMN 12
VALUE
" Press <F10> to exit.
Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms 11–37
PIC X.
PIC X.
VALUE FKEY-10-VAL.
PIC X.
PIC X(160).
PIC XX.
PIC XX.
PIC XX.
PIC XX.
PIC XX.
PIC X.
PIC X(80).
".
(continued on next page)
Need help?
Do you have a question about the COBOL AAQ2G1FTK and is the answer not in the manual?
Questions and answers