Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms
11.3 Designing Video Forms with Screen Section ACCEPT and DISPLAY
screen (starting in the 60th column of the first line). Elsewhere, you could
display the legend box, using the same screen description entry, at a different
position on the screen, by choosing different LINE and COLUMN options with
the DISPLAY statement.
•
The default value for an update screen item is the current value of the FROM
or USING data item. The default value for an input screen item is spaces or
zero, depending on the data type of the screen item.
If the operator terminates the ACCEPT before entering a value for each field,
the default value remains in the untouched screen items.
•
To catch any function keys that the operator presses, use the CRT STATUS
option. All control sequences are captured and processed by Compaq COBOL
and not returned to the application.
Refer to Section 11.2, and also the Compaq COBOL Reference Manual Data
Division chapter’s section on Screen Description and clauses, for details on these
features.
In Example 11–12, a video form is designed for a daily calendar. With it you
can display appointments, schedule new appointments, cancel appointments, and
print appointments.
Example 11–12 Designing a Video Form for a Daily Calendar
IDENTIFICATION DIVISION.
PROGRAM-ID. MENU.
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
*
The SPECIAL-NAMES paragraph that follows provides for the
*
capturing of the F10 function key and for positioning of the
*
cursor.
SPECIAL-NAMES.
SYMBOLIC CHARACTERS
FKEY-10-VAL
ARE 11
CURSOR IS CURSOR-POSITION
CRT STATUS IS CRT-STATUS.
DATA DIVISION.
WORKING-STORAGE SECTION.
*
CURSOR-LINE specifies the line and CURSOR-COL specifies the
*
column of the cursor position.
01
CURSOR-POSITION.
02
CURSOR-LINE
PIC 99.
02
CURSOR-COL
PIC 99.
(continued on next page)
11–36 Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms
Содержание COBOL AAQ2G1FTK
Страница 22: ......
Страница 30: ......
Страница 94: ......
Страница 110: ......
Страница 146: ......
Страница 180: ......
Страница 194: ...Processing Files and Records 6 1 Defi...
Страница 300: ......
Страница 490: ......
Страница 516: ......
Страница 517: ......
Страница 530: ......
Страница 534: ......
Страница 590: ......
Страница 620: ......