HP 3000 Manuals

Roll Key Processing [ HP RPG/XL Utilities-Part 3 SIGEDITOR ] MPE/iX 5.0 Documentation


HP RPG/XL Utilities-Part 3 SIGEDITOR

Roll Key Processing 

Roll key processing provides a method for the user to view more than one
help form after pressing the  f6  (HELP) key.  After the form named on
the help area list entry has been displayed, the user has the option of
pressing the ENTER key to return to the application or pressing the  f3  
(ROLL UP) or  f1  (ROLL DOWN) key.  Either roll key displays another help
form.  If there isn't another help form, an appropriate message will be
displayed on the terminal.

Help forms are selected during roll key processing according to a
three-phase algorithm which is not related to the cursor position.

Three Phases of Roll Key Processing 

Following are descriptions of the three phases of roll key processing.

Stage One.  In the first stage of roll key processing, the RSI program
searches for the next form in the same form family.

If the user presses the  f3  (ROLL UP) key, the form with the next higher
last two digits is selected and displayed.  If the user presses the  f4  
(ROLL DOWN) key, the form with the next lower last two digits is selected
and displayed.  This form may or may not be on the help area list for
that form, but it is still accessed by roll keys.  If the help form
currently displayed is the highest or lowest form in the family, roll key
processing advances to the second stage.

Stage Two.  In the second stage of roll key processing, the RSI program
attempts to find the next help area in the list that specifies a help
form in a different family.

If the user presses the  f3  (ROLL UP) key, the search moves forward,
starting with the next entry in the help area list.  If the user presses
the  f4  (ROLL DOWN) key, the search moves backward, starting with the
previous entry in the help area list.  If the search encounters a
boundary, processing continues from the nearest boundary at the opposite
end of the list (the end of the list is an implied boundary).  When
moving forward (rolling up), the boundary is included in the search.  In
all other cases, the boundary is excluded from the search.  If a help
area list entry that specifies a different help form family cannot be
found, roll key processing advances to the third stage.

Stage Three.  In the third stage of roll key processing, the RSI program
attempts to locate a help form at the opposite end of the form family.

If the user presses the  f3  (ROLL UP) key and the help form displayed
has the highest last two digits in the family, the form with the lowest
last two digits is selected.  If the user presses the  f4  (ROLL DOWN)
key and the help form displayed has the lowest last two digits in the
family, the form with the highest last two digits is selected.  If there
are no other forms in the family, a message will be displayed stating
that there is no additional help text available and the user is returned
to the application form.  Note that the forms may or may not be in the
help area list, but are still accessed in stage three.

Stage One and Stage 
Three Example 

Form file RSIH002S contains four forms.  They are F001, HELPAA01,
HELPAA02, and HELPAA03.  F001 is the application form.  HELPAA02 is the
only help form specified in the help area list for form F001.  When
program execution begins, form F001 is displayed on the screen by RPG
(see figures 3-4 and 3-5).
_______________________________________________________________________
|                                                                     |
|         $CONTROL QUOTE=`                                            |
|         HDUMPFILE JF         X     B      B M     P1 1              |
|         HSCRNFILEUD  V      7           WORKSTNR    B               |
|         F                                            KFORMS RSIH002F|
|         I SCRNFILENS                                                |
|         C                    EXCPT          F001                    |
|         C                    READ SCRNFILE                          |
|         C                    SETON                      LR          |
|         OSCRNFILEE               F001                               |
|         O                                  K6 'F001'                |
|                                                                     |
_______________________________________________________________________

          Figure 3-4.  Example Program for Form File RSIH002S 
______________________________________________________________________________________
|                                                                                    |
|        RPG Screen Interface - Help Area List Specification                         |
|     Form File:  RSIH002F                                  Form:  F001              |
|                                                                                    |
|     ---------------------------------------------------------------------------    |
|                                                                                    |
|                            Upr Left    Lower Rt    Indicators                      |
|          ID      Form      Row  Col    Row  Col    SS  BI                          |
|                                                                                    |
|          10    HELPAA02      6   13     20   75        N                           |
|                                                                                    |
|                                                                                    |
|                                                                                    |
|                                                                                    |
|                                                                                    |
|                                                                                    |
|                                                                                    |
|     ---------------------------------------------------------------------------    |
|                                                                                    |
|                List Entry ID:          New List Entry ID:                          |
|                                                                                    |
|      CHANGE    DELETE     CHANGE  SHOW ALL    SCROLL     SCROLL   ABANDON      HELP|
|      ATTRIB     AREA        ID     AREAS      FORWARD     BACK    ALL CHGS     MENU|
|                                                                                    |
______________________________________________________________________________________

          Figure 3-5.  Example Screen for Form File RSIH002F 

          Table 3-1.  Help Form Selection, Example 1 

-----------------------------------------------------------------------------------------------
|                   |                                                     |                   |
|    Key Pressed    |               Form Selection Process                |  Form Displayed   |
|                   |                                                     |                   |
-----------------------------------------------------------------------------------------------
|                   |                                                     |                   |
|     Help (F6)     | First form on the help area list whose coordinates  |     HELPAA02      |
|                   | contain the cursor is selected.                     |                   |
|                   |                                                     |                   |
|   Roll Up (F3)    | Stage One:  RPG looks for a form that belongs to    |     HELPAA03      |
|                   | the same form family (first six characters of the   |                   |
|                   | same form name), but which has a greater value in   |                   |
|                   | the last two digits of the form name.  HELPAA03 is  |                   |
|                   | found.  The search stops.                           |                   |
|                   |                                                     |                   |
|   Roll Up (F3)    | Stage One:  RPG looks for the next form in the same |     HELPAA01      |
|                   | form family with the last two digits greater than   |                   |
|                   | 03.  None is found.                                 |                   |
|                   |                                                     |                   |
|                   | Stage Two:  RPG looks for a different form family   |                   |
|                   | on the help area list.  None is found.              |                   |
|                   |                                                     |                   |
|                   | Stage Three:  RPG goes to the opposite end of the   |                   |
|                   | current form family (wrap around).  Form HELPAA01   |                   |
|                   | is found.  The search stops.                        |                   |
|                   |                                                     |                   |
|   Roll Up (F3)    | Stage One:  RPG looks for the next form up in the   |     HELPAA02      |
|                   | same form family.  HELPAA02 is found.  The search   |                   |
|                   | stops.                                              |                   |
|                   |                                                     |                   |
|  Roll Down (F4)   | Stage One:  RPG looks for the next form down in the |     HELPAA01      |
|                   | same form family.  HELPAA01 is found.  The search   |                   |
|                   | stops.                                              |                   |
|                   |                                                     |                   |
|  Roll Down (F4)   | Stage One:  RPG looks for the next form down in the |     HELPAA03      |
|                   | same form family.  None is found.                   |                   |
|                   |                                                     |                   |
|                   | Stage Two:  RPG looks for a different form family   |                   |
|                   | on the help area list.  None is found.              |                   |
|                   |                                                     |                   |
|                   | Stage Three:  Search goes to the opposite end of    |                   |
|                   | the form family (wrap around).  Form HELPAA03 is    |                   |
|                   | found.  The search stops.                           |                   |
|                   |                                                     |                   |
|  Roll Down (F4)   | Stage One:  RPG searches for the next form down in  |     HELPAA02      |
|                   | the same form family.  HELPAA02 is found.  The      |                   |
|                   | search stops.                                       |                   |
|                   |                                                     |                   |
-----------------------------------------------------------------------------------------------

Stage One and Stage 
Two Example 

Form file RSIH010F contains eight forms.  They are F001, HELPAA02,
HELPAA03, HELPBB01, HELPCC01, HELPCC02, HELPCC03, and HELPDD02.  F001 is
the application form.

The F001 application form contains HELPAA02, HELPBB01, and HELPCC02 (in
that order) in its help list area.  Notice that HELPBB01 and HELPCC02 are
null help areas since the cursor's coordinates are 0's.  Null help areas
can only be reached by roll key processing.

Also note that form HELPDD02 will never be reached.  Stage two of the
selection process, which is the only stage that searches for a different
form family, only searches through the current help area list.  HELPDD02
is not on that list.

Program execution begins; RPG displays form F001.
_______________________________________________________________________
|                                                                     |
|         $CONTROL QUOTE=`                                            |
|         HDUMPFILE JF         X     B      B M     P1 1              |
|         HSCRNFILEUD  V      7           WORKSTNR    B               |
|         F                                            KFORMS RSIH010F|
|         I SCRNFILENS                                                |
|         C                    EXCPT          F001                    |
|         C                    READ SCRNFILE                          |
|         C                    SETON                      LR          |
|         OSCRNFILEE               F001                               |
|         O                                  K6 'F001'                |
|                                                                     |
_______________________________________________________________________

          Figure 3-6.  Example Program for Form File RSIH010S 
______________________________________________________________________________________
|                                                                                    |
|        RPG Screen Interface - Help Area List Specification                         |
|     Form File:  RSIH002F                                  Form:  F001              |
|                                                                                    |
|     ---------------------------------------------------------------------------    |
|                                                                                    |
|                            Upr Left    Lower Rt    Indicators                      |
|          ID      Form      Row  Col    Row  Col    SS  BI                          |
|                                                                                    |
|          10    HELPAA02     13   41     17   48        N                           |
|          20    HELPBB01      0    0      0    0        N                           |
|          30    HELPCC02      0    0      0    0        N                           |
|                                                                                    |
|                                                                                    |
|                                                                                    |
|                                                                                    |
|                                                                                    |
|     ---------------------------------------------------------------------------    |
|                                                                                    |
|                List Entry ID:          New List Entry ID:                          |
|                                                                                    |
|      CHANGE    DELETE     CHANGE  SHOW ALL    SCROLL     SCROLL   ABANDON      HELP|
|      ATTRIB     AREA        ID     AREAS      FORWARD     BACK    ALL CHGS     MENU|
|                                                                                    |
______________________________________________________________________________________

          Figure 3-7.  Example Screen for Form File RSIH010S 

          Table 3-2.  Help Form Selection, Example 2 

-----------------------------------------------------------------------------------------------
|                   |                                                     |                   |
|    Key Pressed    |               Form Selection Process                |  Form Displayed   |
|                   |                                                     |                   |
-----------------------------------------------------------------------------------------------
|                   |                                                     |                   |
|     Help (F6)     | The first form in the help area list whose          |     HELPAA02      |
|                   | coordinates contain the cursor is selected.         |                   |
|                   |                                                     |                   |
|   Roll Up (F3)    | Stage One:  RPG searches for the next form in the   |     HELPAA03      |
|                   | same form family.  HELPAA03 is found.  The search   |                   |
|                   | stops.                                              |                   |
|                   |                                                     |                   |
|   Roll Up (F3)    | Stage One:  RPG searches for the next form in the   |     HELPBB01      |
|                   | same form family with the last two digits of the    |                   |
|                   | form name greater than 03.  None is found.          |                   |
|                   |                                                     |                   |
|                   | Stage Two:  RPG looks for a different form family   |                   |
|                   | on the help area list.  HELPBB01 is chosen since it |                   |
|                   | is the next form family on the list.  The search    |                   |
|                   | stops.                                              |                   |
|                   |                                                     |                   |
|   Roll Up (F3)    | Stage One:  No other form in the same form family   |     HELPCC02      |
|                   | exists in the form file.                            |                   |
|                   |                                                     |                   |
|                   | Stage Two:  RPG looks for the next form family on   |                   |
|                   | the help area list.  HELPCC02 is next.  The search  |                   |
|                   | stops.                                              |                   |
|                   |                                                     |                   |
|   Roll Up (F3)    | Stage One:  The next form in the same form family,  |     HELPCC03      |
|                   | HELPCC03 is found.  The search stops.               |                   |
|                   |                                                     |                   |
|   Roll Up (F3)    | Stage One:  RPG looks for the next form in the same |     HELPAA02      |
|                   | form family.  None is found.                        |                   |
|                   |                                                     |                   |
|                   | Stage Two:  RPG tries to locate the next form       |                   |
|                   | family on the help area list, but RPG is already at |                   |
|                   | the end of that list.  The search now goes to the   |                   |
|                   | opposite end of the area list and selects HELPAA02. |                   |
|                   |                                                     |                   |
|                   |                                                     |                   |
|                   | NOTE: The search did not select HELPCC01 because    |                   |
|                   | going to the opposite end of the current form       |                   |
|                   | family would be done in Stage Three.  We never got  |                   |
|                   | to Stage Three since RPG located a form in Stage    |                   |
|                   | Two.                                                |                   |
|                   |                                                     |                   |
|  Roll Down (F4)   | Stage One:  RPG looks for a form in the same form   |     HELPCC02      |
|                   | family where the last two digits of the form name   |                   |
|                   | has a value less than 02.  None is found.           |                   |
|                   |                                                     |                   |
|                   | Stage Two:  RPG looks for the previous form family  |                   |
|                   | on the help area list.  Since we are already at the |                   |
|                   | beginning of the list, the search goes to the       |                   |
|                   | opposite end of the list (wrap around), and locates |                   |
|                   | HELPCC02.  The search stops.                        |                   |
|                   |                                                     |                   |
|  Roll Down (F4)   | Stage One:  The form that has a last two digit      |     HELPCC01      |
|                   | value of less than 02 is found in the same form     |                   |
|                   | family.  The search stops.                          |                   |
|                   |                                                     |                   |
-----------------------------------------------------------------------------------------------

          Table 3-2.  Help Form Selection, Example 2 (continued) 

-----------------------------------------------------------------------------------------------
|                   |                                                     |                   |
|    Key Pressed    |               Form Selection Process                |  Form Displayed   |
|                   |                                                     |                   |
-----------------------------------------------------------------------------------------------
|                   |                                                     |                   |
|  Roll Down (F4)   | Stage One:  RPG looks for the next form in the same |     HELPBB01      |
|                   | form family that has the last two digits value of   |                   |
|                   | less than 01.  None is found.                       |                   |
|                   |                                                     |                   |
|                   | Stage Two:  RPG locates the previous form on the    |                   |
|                   | help area list that belongs to a different form     |                   |
|                   | family.                                             |                   |
|                   |                                                     |                   |
|  Roll Down (F4)   | Stage One:  No other form from this form family     |     HELPAA02      |
|                   | exists on the help area list.                       |                   |
|                   |                                                     |                   |
|                   | Stage Two:  RPG locates the previous form belonging |                   |
|                   | to a different form family on the help area list.   |                   |
|                   | The search stops.                                   |                   |
|                   |                                                     |                   |
-----------------------------------------------------------------------------------------------

Null Help Areas 

Null help is a capability which is used to provide additional information
on any help area.  Null help areas can be appended within any roll key
processing stage to provide additional information.  Null help areas are
entries in the help area list that have zeros for upper left row/column
and lower right row/column.  They cannot be selected directly from the
application form, and must be selected using roll key processing.  Null
help areas can be used to display more general help text after the
initial display of help text that is specific to the cursor location.



MPE/iX 5.0 Documentation