Purpose
|
|
| GRQCH |
(wkid, chdnr, stat, chnr) |
| |
|
| APL code |
1380 |
| GKS RCP code |
X'38005400' (939545600) |
| |
|
Function: To request choice.
Input function. Obtains request mode input from a choice device at a
workstation.
Parameters
wkid (specified by user) (fullword integer)
The workstation identifier.
chdnr (specified by user) (fullword integer)
The choice device identifier. The possible values are
- 1
- The Enter key. The operator presses the enter key to trigger the
device. The choice number returned is always 1.
- 2
- The PF keys. The operator presses a PF key to trigger the device.
The choice number returned is the number of the PF key pressed.
Note that only PF keys 1 to 12 are supported by GDDM-GKS. If the
operator presses a PF key in the range 13 through 24 on a
workstation equipped with 24 PF keys then the value is mapped to the
range 1 through 12.
- 3
- The alphanumeric light pen. The operator selects a
light-pen-detectable field by using either a light pen attached to
the display, or the cursor select key. You must have created the
light-pen-detectable fields by using the appropriate GDDM
alphanumeric functions. If the operator selects a field, the choice
number returned is 1. You must use GDDM alphanumeric functions to
determine which field was selected.
- 4
- The data keys. If data keys are available as a choice device, the
device is triggered when the operator presses a data key. The
choice number returned is in the range 1 through 255, and is the
character code corresponding to the key that was pressed.
- 5
- The mouse or tablet buttons. If a mouse or tablet is available at
the workstation, the device is triggered when the operator presses a
button on the mouse or tablet puck, or presses the stylus. For a
tablet stylus, the choice number returned is 1; for a mouse or
tablet puck, it is the number of the button pressed.
stat (returned by GDDM) (fullword integer)
The device status. The possible values are (see the section
"Description" below, for an explanation of these values):
- 0 (GNONE)
- None
- 1 (GOK)
- OK
- 2 (GNCHOI)
- No choice
chnr (returned by GDDM) (fullword integer)
The choice number selected by the operator. This value is returned only
if stat is returned as OK. It is in the range 1 through the maximum
number of choice alternatives for the choice device specified by chdnr.
Operating states
WSOP, WSAC, SGOP
Related functions
Initialize choice (GINCH), Set choice mode (GSCHM), Inquire number of
available logical input devices (GQLI), Inquire default choice device data
(GQDCH)
Description
This function obtains request mode input from the choice device chdnr at
workstation wkid.
Choice input can be terminated normally by the corresponding trigger (for
example, a button on the choice device), or abnormally by a break signal.
The status values have the following meanings:
- None
- is returned if the operation is not successful. Either the operator
has used the break signal, or an error was detected when you called the
function.
- OK
- is returned if the operator uses the trigger, and the choice is valid.
The parameter chdnr is set to the logical input value that is the
current measure of the choice device.
- No
- choice is returned if the operator terminates the input operation
without using either the device trigger or the break signal. The input
operation can be terminated in this way as follows:
- For the PF key, data key, mouse, and tablet choice devices: if the
Enter key is pressed.
- For the alphanumeric light pen: if the operator presses the Enter
key, or a PF or PA key.
Not all choice devices are available at all workstations. You can use the
function Inquire number of available logical input devices (GQLI) to
determine which devices are available at a particular workstation. You
can use the function Inquire default choice device data (GQDCH) to obtain
the maximum number of choice alternatives for a particular choice device.
You can control the choice input process by using the functions Initialize
choice (GINCH) and Set choice mode (GSCHM). The default mode of a choice
device is request.
Principal errors
- 7
- GKS not in proper state: GKS shall be in one of the states WSOP,
WSAC, or SGOP
- 20
- Specified workstation identifier is invalid
- 25
- Specified workstation is not open
- 38
- Specified workstation is neither of category INPUT nor of
category OUTIN
- 140
- Specified input device is not present on workstation
- 141
- Input device is not in REQUEST mode
|