Compaq COBOL AAQ2G1FTK User Manual
Page 408
Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms
11.2 Designing Video Forms with ACCEPT and DISPLAY Statement Extensions
Example 11–9 Using the DEFAULT Phrase
IDENTIFICATION DIVISION.
PROGRAM-ID. TRYDEF.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
01
DATA1A
PIC 9(12).
01
NAME1A
PIC XXXXX.
01
PRICEA
PIC S99V99.
01
DATA123.
02
NAME1B
PIC XXXXX.
02
PIC XX VALUE SPACES.
02
DATA1B
PIC XXXXXXXXXXXX.
02
PIC XXX VALUE SPACES.
02
PRICEB
PIC $99.99-.
01
NAME-DEFAULT PIC XXXXX VALUE "[TBS]".
01
COL-NUM
PIC 99
VALUE 10.
PROCEDURE DIVISION.
A00-DEFAULT-TEST.
DISPLAY "*********PLEASE ENTER THE FOLLOWING INFORMATION*********"
LINE 5 COLUMN 15
REVERSED BLINKING
ERASE SCREEN.
DISPLAY "********************************************************"
LINE 7 COLUMN 15.
DISPLAY " Part
Part
Part
---------STORED AS-----------"
LINE 9 COLUMN 15.
DISPLAY " Name
Number
Price
Name
Number
Price"
LINE 10 COLUMN 15.
DISPLAY "Defaults --->[TBS] ***[TBS]**** +00.00"
LINE 11 COLUMN 2.
DISPLAY "----- ------------ ------"
LINE 12 COLUMN 15.
DISPLAY "********************************************************"
LINE 20 COLUMN 15.
DISPLAY "5. " REVERSED BLINKING LINE 18 COLUMN COL-NUM.
DISPLAY "4. " REVERSED BLINKING LINE 17 COLUMN COL-NUM.
DISPLAY "3. " REVERSED BLINKING LINE 16 COLUMN COL-NUM.
DISPLAY "2. " REVERSED BLINKING LINE 15 COLUMN COL-NUM.
DISPLAY "1. " REVERSED BLINKING LINE 14 COLUMN COL-NUM.
DISPLAY " " LINE 13 COLUMN 15.
PERFORM A05-GET-DATA 5 TIMES.
DISPLAY " " LINE 22 COLUMN 1.
STOP RUN.
(continued on next page)
11–18 Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms