9.7 ALLOW_EXTRA_USER_KEY

Note: Built-In Function Rules     Usage Options

Enables an "extra" user defined function key above and beyond any that are normally enabled by parameters on a DISPLAY, REQUEST or POP_UP command.

Arguments

No

Type

Req/ Opt

Description

Min Len

Max Len

Min Dec

Max Dec

1

N

Req

A literal or variable that specifies or contains the number of the extra function key to be enabled. The value specified should be in the range 1 to 24 or it will be ignored.

1

2

0

0

2

A

Opt

Literal or variable that specifies or contains the description that should be associated with the function key when it is displayed in the function key area of a screen panel.

1

10

 

 

 

Return Values

No return values.

Technical Notes

Examples

Enable function key 5 on all panels and pop-ups within a function:

FUNCTION OPTIONS( ........)

USE      BUILTIN(ALLOW_EXTRA_USER_KEY) WITH_ARGS(5 'Refresh')

Enable function keys 18 and 19 on a particular panel and make sure that no other extra keys are accidentally enabled:

USE      BUILTIN(DROP_EXTRA_USER_KEYS)

USE      BUILTIN(ALLOW_EXTRA_USER_KEY) WITH_ARGS(18 '''Hold''')

USE      BUILTIN(ALLOW_EXTRA_USER_KEY) WITH_ARGS(19 '''Save''')

DISPLAY  FIELDS(........)

CASE     OF_FIELD(#IO$KEY)

WHEN     VALUE_IS('= ''18''')

         << hold processing >>

WHEN     VALUE_IS('= ''19''')

         << save processing >>

ENDCASE

Enable extra function keys 14 to 21:

DEFINE     FIELD(#I) TYPE(*DEC) LENGTH(2) DECIMALS(0)

USE        BUILTIN(DROP_EXTRA_USER_KEYS)

BEGIN_LOOP FROM(14) TO(21) USING(#I)

USE      BUILTIN(ALLOW_EXTRA_USER_KEY) WITH_ARGS(#I)

END_LOOP