Sign in

docs RPG Reference

Function Key Indicators

Function Key Indicators

You can use function key indicators in a program that contains a WORKSTN device if the associated function keys are specified in data description specifications (DDS). Function keys are specified in DDS with the CFxx or CAxx keyword. For an example of using function key indicators with a WORKSTN file, see the WORKSTN chapter in the Rational® Development Studio for i: ILE RPG Programmer’s Guide.

Function Key IndicatorCorresponding Function KeyFunction Key IndicatorCorresponding Function Key
KA1KM13
KB2KN14
KC3KP15
KD4KQ16
KE5KR17
KF6KS18
KG7KT19
KH8KU20
KI9KV21
KJ10KW22
KK11KX23
KL12KY24

The function key indicators correspond to function keys 1 through 24. Function key indicator KA corresponds to function key 1, KB to function key 2 … KY to function key 24.

Function key indicators that are set on can then be used to condition calculation or output operations. Function key indicators can be set off by the SETOFF operation.