GDDM V3R2 Base Application Programming Guide
|
Previous topic |
Next topic |
Contents |
Index |
Contact z/OS |
Library |
PDF |
BOOK
Processing choice input from the data keys GDDM V3R2 Base Application Programming Guide SC33-0867-01 |
|
When the data keys are enabled as a choice device, pressing any one of them generates an item of choice data. For instance, when the end user presses the A key, the terminal interrupts the host and transmits the letter A to it, which GDDM puts on the input queue. For an alphanumeric key, the value that the GSQCHO call reads from the input queue derives from the EBCDIC code for the key's character. This is treated as a hexadecimal number. For instance, the EBCDIC code for uppercase A is X'C1', which is equivalent to decimal 193; so the A key returns the value 193. For nonalphanumeric keys like the cursor keys and ERASE EOF, refer to the Graphics Control Program Workstation Programmer's Guide and Reference. This provides a list of all the keyboard buttons that can provide input, together with the codes they return. You need to know when you code your program whether it should accept uppercase or lowercase characters, or both, so that you can test for the appropriate codes. If you are expecting input from the numeric data keys, you should remember that the codes are in the range 240 through 249 (corresponding to X'F0' through X'F9') not 0 through 9. |
Copyright IBM Corporation 1990, 2012 |