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

4-: 71
Indicator 81 is turned ON to allow override and to sound the
alarm (beep). When override is in effect, data on the screen
remains unaltered except for attributes conditioned by
indicators and output fields conditioned by indicators that are
ON.
7 This line begins the subroutine that reads the form and checks
to see if the user pressed a function key. Indicator H0 is
turned ON by the READ WORKSTN operation when a terminal read
error occurs.
When READ is executed, a code that identifies which function key
(if any) was pressed, is placed in the first element of the STAT
array. If the ENTER key was pressed this element equals 0 and
indicator 49 is turned ON. Since none of the function keys were
enabled on the form, the only other possible value is 2 (which
indicates that a command key was pressed).
8 This line begins the output record description for the RSI form.
The specifications were generated by SIGEDITOR, then modified.
The form name is entered as a constant in the first line. It
has a length of 8 and the prefix "K". The field used for
messages, MSG, is indexed by M# (M# contains the number of the
message). MSG is conditioned by indicator 82 and the SIGEDITOR
"Output Data" attribute for MSG also contains 82.
Using RSI CONSOLE Files
RSI CONSOLE files are RSI files that are used for input only and whose
forms file is generated automatically during compilation. RSI handles
all file input and output during run time.
To use an RSI CONSOLE file in an RPG program, perform the following steps
(the steps are discussed in detail in the following sections in this
chapter):
* Define the RSI CONSOLE form
Enter the File Description and Input Specifications that describe the
form, then compile the program. The forms file is generated
automatically. If you wish, you can use SIGEDITOR to modify the
form.
File Description Specifications -
These specifications define the file as an RSI WORKSTNC file.
Input Specifications -
These specifications define the fields that are used for input.
* Process data entered in the form
Calculation Specifications -
Since RSI handles all of the input and output for the CONSOLE form,
you do not enter Calculation Specification operations to do this.
However, you must enter the usual operations to process the data once
it is read.
Defining an RSI CONSOLE File. Figure 4-35 shows the File Description and
Input Specifications that define the RSI CONSOLE file SCRNFILE. SCRNFILE
is defined as a WORKSTNC file (line 1) which consists of three different
forms. The first form is FORM01 and is defined starting with line 2.
(The form name is "FORM" suffixed by the record-identifying indicator for
the record type.) Lines 3 and 4 start the definitions for the second and
third forms, respectively.