Restriction: This routine is not supported when CHARSET"EBCDIC" is in effect.
Gets a character from the keyboard.
Syntax:
call x"AF" using function-code
key-status
Parameters:
-
function-code
- Call prototype: cblt-x1-compx
- Picture: pic x comp-x.
-
key-status
- Group containing:
01 key-status
03 key-type pic x. *> pic x.
03 key-code-1 cblt-x1-compx *> pic x comp-x.
03 key-code-2 cblt-x1-compx *> pic x comp-x.
On Entry:
-
function-code
- Value 26.
On Exit:
-
key-type
- The type of key read, as follows:
1
|
User-defined function key
|
2
|
Adis function key
|
3
|
Data key
|
9
|
Error
|
-
key-code-1
- When
key-type is 1 or 2, contains the number of the key; 0-127 for user-defined and 0-39 for Adis. See the chapter Adis Configuration Utility
(AdisCF) in your Programmer's Guide to Creating User Interfaces for more details on function keys.
When
key-type is 3, contains the ASCII code of the key pressed.
When
key-type is 9, contains an error code:
8
|
A disabled character has been keyed, and
key-code-2 contains the character.
|
9
|
An invalid keystroke (more than one byte) has occurred.
|
Comments:
This routine also causes the COBOL screen handling system to be invoked.