SETKEYENABLED Function

RAMP-NL

SETKEYENABLED Function


Dynamically enable or disable a destination’s button or 5250 function key.

This function overrides the destination’s function key enablement, for the duration of the logged on 5250 session. The override will impact all future displays of the destination screen.

Syntax

SETKEYENABLED (sDestinationName,sKeyName,bEnableVLF,bEnableNL)

Parameters

sDestinationName

Required. A string that contains the name of a Destination.

sKeyName

Required. String that contains the name of the key. See Function Key Names for SENDKEY Function.

bEnableVLF

Optional. Boolean. Set to true to show the button, false to hide it, null to ignore.

bEnableNL

Optional. Boolean. Set to true to enable the 5250 function key, false to disable it, null to ignore.

Return Value

None

Example

The Destination named uDisplayEmployee was set up to Show the prompt button but disable the F4 5250 function key.

To override those settings to the reverse:

 

SETKEYENABLED("uDisplayEmployee", KeyF4, false,true);

 

To leave the original setting for the button but enable the F4 function key as well:

  

SETKEYENABLED("uDisplayEmployee", KeyF4, null,true);