X"AF" function 26

Gets a character from the keyboard.

Syntax:
call x"AF" using function-code
                 key-status
Parameters:
Using call prototype (see Library Routines - Key) Picture (32-bit systems)
function-code cblt-x1-compx pic x comp-x.
key-status Group containing: Group containing:
  key-type   pic x.   pic x.
  key-code-1   cblt-x1-compx   pic x comp-x.
  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. See the chapter Comparison of Screen Handling Methods in your Programmer's Guide to Creating User Interfaces for details.

See Also: