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
PIC X.
03 KEY2
PIC X.
88 FKEY-10
VALUE FKEY-10-VAL.
03 filler
PIC X.
*
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
PIC X(160).
01 APPT-DAY
PIC XX.
01 APPT-MONTH
PIC XX.
01 APPT-YEAR
PIC XX.
01 APPT-HOUR
PIC XX.
01 APPT-MINUTE
PIC XX.
01 APPT-MERIDIEM PIC XX.
01 APPT-VERIFY
PIC X.
01 EMPTY-LINE
PIC X(80).
*
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.
".
(continued on next page)
Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms 11–37
Содержание COBOL AAQ2G1FTK
Страница 22: ......
Страница 30: ......
Страница 94: ......
Страница 110: ......
Страница 146: ......
Страница 180: ......
Страница 194: ...Processing Files and Records 6 1 Defi...
Страница 300: ......
Страница 490: ......
Страница 516: ......
Страница 517: ......
Страница 530: ......
Страница 534: ......
Страница 590: ......
Страница 620: ......