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
*
For brevity, the sample program includes complete code
*
for the "Schedule Appointment" screen only.
A complete
*
program for a calendar would also include code for
*
displaying, canceling, and printing the day’s appointments.
IF CURSOR-LINE = 7
DISPLAY "You selected Show Appointments" LINE 22.
IF CURSOR-LINE = 9
MOVE "01" TO APPT-DAY
MOVE "01" TO APPT-MONTH
MOVE "94" TO APPT-YEAR
MOVE "12" TO APPT-HOUR
MOVE "00" TO APPT-MINUTE
MOVE "AM" TO APPT-MERIDIEM
DISPLAY SCHEDULE-SCREEN
*
The user types the description, date, and time of the
*
appointment.
ACCEPT SCHEDULE-SCREEN
MOVE "Y" TO APPT-VERIFY
DISPLAY VERIFY-SUBSCREEN
*
The user is asked, "Is this entry correct?"
Answer is
*
Y or N.
ACCEPT VERIFY-SUBSCREEN.
IF CURSOR-LINE = 11
DISPLAY "You selected Cancel Appointments" LINE 22.
IF CURSOR-LINE = 13
DISPLAY "You selected Print Appointments" LINE 22.
END PROGRAM MENU.
In Figures 11–14 and 11–15, the output from the sample program is shown.
Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms 11–39
Содержание COBOL AAQ2G1FTK
Страница 22: ......
Страница 30: ......
Страница 94: ......
Страница 110: ......
Страница 146: ......
Страница 180: ......
Страница 194: ...Processing Files and Records 6 1 Defi...
Страница 300: ......
Страница 490: ......
Страница 516: ......
Страница 517: ......
Страница 530: ......
Страница 534: ......
Страница 590: ......
Страница 620: ......