ONKEY

ONKEY returns a character string whose value is the key of the record that raised an input/output condition. For indexed files, if the key is GRAPHIC, the string is returned as a mixed character string. ONKEY is in context for the following: ONKEY is always set for operations on a KEYED file, even if the statement that raised the condition does not specified the KEY, KEYTO, or KEYFROM options.
Read syntax diagramSkip visual syntax diagram
>>-ONKEY-+----+------------------------------------------------><
         '-()-'   

The result of specifying ONKEY is:

If ONKEY is used out of context, a null string is returned.






Published: 23 December 2018