Detect left or right arrow keys in display mode |
Source |
S.RLK |
CALL RLK USING Window Field ["B"] |
Parameters |
Window |
The id of the speedbase window to be entered. |
Field |
A PIC 9 C variable used to return a result code. |
"B" |
An optional literal or variable used to indicate that the window is to be displayed in reverse order (see BACK for details). |
Copybooks |
None |
|
Other Requirements |
The calling program must be 'flat' - i.e. all enter window statements are coded in the procedure division and not in the routines sections (or subroutines in the procedure division called from the routines sections). This usually means you have to clear the windows manually. |
Routine only works when the window is in display mode. |
Purpose |
This routine is used in place of the standard ENTER WINDOW command and returns an exception when either left or right arrow is keyed whilst the window is in display mode. The second parameter passed will contain 1 if left arrow was keyed, 2 for right arrow and 0 for any other exception, i.e. the abort key or escape key was pressed. The routine was created to allow alternate view handling to be introduced. This allows the user to move between different views of the same piece of information. These different views are in fact separate windows that are moved between using left and right arrow. |
Exceptions |
Standard window exception codes. |
Example |
CALL RLK USING W1 W-KEY ON EXCEPTION IF W-KEY = 1 * Left arrow was pressed. ... ELSE IF W-KEY = 2 * Right arrow was pressed. ... ELSE EXIT WITH 1 * Escape or Abort was keyed. END END END |
Global 3000 Example |
For an example of how to use this routine, see SO110 (Sales order summary) that uses this routine to display alternate views of the stock queue. |
© 1998 TIS Software Ltd