HP RPG/XL Programmer's Guide (30318-90001)

4- 14
Figure 4-8. Displaying Function Key Labels
Comments
1 This line defines the array, KEYLBL, that contains the function
key label text. There are 8 labels in the array, each label
containing 16 characters.
2 This line enables the function keys F4 , F7 and F8 . It
also displays the function key labels saved in the KEYLBL array.
3 This line is the last line of Output Specifications. Following
this line are the contents of the function key labels array
(KEYLBL).
Using Escape Sequences
Escape sequences let you perform many terminal-handling functions for
which there is no corresponding RPG language facility. For example, you
can use escape sequences to set graphics mode, move the cursor and reset
the terminal.
The Calculation Specification operation, DSPLY, can be used to "display"
escape sequences. You enter an escape sequence literal in the Factor 1
Field of a Calculation Specification. Figure 4-9 shows how to use escape
sequences to home the cursor, clear the screen and release a memory lock.
Instead of entering the escape sequences as literals in your program, you
can enter them into a message file (see the next section for information
on message files).
1 2 3 4 5 6 7
678901234567890123456789012345678901234567890123456789012345678901234
E* FUNCTION KEY LABEL ARRAY
E* KEYLBL 1 8 16
C.
C.
C .
C KEYLBL SET
O.
O.
O
KEYLBL ARRAY
ADD SRC CODE
DEL SRC CODE
CHG DESCR .
1
2
3
**
ADD
SRC CODE
DEL
SRC CODE
CHG
DESCR