Using The Control Key In Phrase - Compaq COBOL AAQ2G1FTK User Manual

Compaq computer accessories user manual
Table of Contents

Advertisement

Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms
11.2 Designing Video Forms with ACCEPT and DISPLAY Statement Extensions
Example 11–10 Using the CONTROL KEY IN Phrase
IDENTIFICATION DIVISION.
PROGRAM-ID. SPECIAL.
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SPECIAL-NAMES.
SYMBOLIC CHARACTERS
CR-VAL CSI-VAL Ctrl-Z-VAL SS3-VAL TAB-VAL ESC
ARE 14
DATA DIVISION.
WORKING-STORAGE SECTION.
*
*
The code returned will be the same regardless of
*
terminal type.
*
01 CONTROL-KEY.
02 FIRST-CHAR-CONTROL-KEY PIC X.
88 CR
88 CSI
88 Ctrl-Z
88 SS3
88 TAB
02 REMAINING-CHAR-CONTROL-KEY PIC XXXX.
88 UP-ARROW
88 DOWN-ARROW
88 RIGHT-ARROW
88 LEFT-ARROW
88 PF1
88 PF2
88 PF3
88 PF4
88 AUX0
88 AUX1
88 AUX2
88 AUX3
88 AUX4
88 AUX5
88 AUX6
88 AUX7
88 AUX8
88 AUX9
88 AUXMINUS
88 AUXCOMMA
88 AUXPERIOD
88 AUXENTER
PROCEDURE DIVISION.
P0.
*
* DISPLAY ESC "=" puts you in alternate keypad mode
*
DISPLAY ESC "=".
DISPLAY " " ERASE SCREEN.
P1.
DISPLAY "Press a directional arrow, PF, Return, Tab, "
DISPLAY "or auxiliary keypad key (Ctrl/Z stops loop)"
ACCEPT CONTROL KEY IN CONTROL-KEY AT END GO TO P2.
Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms 11–25
156
27
VALUE CR-VAL.
VALUE CSI-VAL.
VALUE Ctrl-Z-VAL.
VALUE SS3-VAL.
VALUE TAB-VAL.
VALUE "A".
VALUE "B".
VALUE "C".
VALUE "D".
VALUE "P".
VALUE "Q".
VALUE "R".
VALUE "S".
VALUE "p".
VALUE "q".
VALUE "r".
VALUE "s".
VALUE "t".
VALUE "u".
VALUE "v".
VALUE "w".
VALUE "x".
VALUE "y".
VALUE "m".
VALUE "l".
VALUE "n".
VALUE "M".
LINE 3 COLUMN 4.
LINE 4 COLUMN 4.
144
10
28.
(continued on next page)

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the COBOL AAQ2G1FTK and is the answer not in the manual?

Table of Contents