SETEID Function

The SETEID function is used to enable an application program to recognize the entry of a Program Attention (PA) key or a Program Function (PF) key by the terminal user.

Some PA and/or PF keys can be reserved for Com-plete functions via system parameters or by user profile definition.

If the PA/PF key entered is allocated to one of the Com-plete functions SUSPEND, HARDCOPY or JUMP then this key is not passed to the application and the appropriate Com-plete function is performed.

If the PA2 key is allocated to the Com-plete HARDCOPY function, then this key is passed to the application if the system parameter definition was OVERRIDE and the application requested that the PA2 key be passed.

The application program can assign a function of its own to one or more PA or PF keys. In order to facilitate recognition of one of these keys, the keys must be masked off from Com-plete. This is accomplished by using the SETEID function. Once the function keys are masked off from Com-plete, the application program must issue a terminal device-dependent read and examine the first character in the input buffer to determine which function key, if any, was pressed.

An application program can issue more than one SETEID function.

Format

The format for using the SETEID function is:

SETEID (retcode,eid) 
retcode Required.
A fullword where Com-plete places the return code upon completion of the operation.
eid Required.
A binary halfword field. Each bit position within the field represents a PAn key or a PFn key.
If a bit position is 1, the associated PA/PF key entry will be returned to the application program. Note that the adding together of values associated with a key produces an eid value necessary for masking those keys.
Use the following table to determine which bit affects the appropriate key:
Key Bit Eid
PA1 0 32768
PA2 1 16384
PA3 2 8192
PF1 3 4096
PF2 4 2048
PF3 5 1024
PF4 6 512
PF5 7 256
PF6 8 128
PF7 9 64
PF8 10 32
PF9 11 16
PF10 12 8
PF11 13 4
PF12 14 2
ALL - specifies a mask of X'FFFF'
NONE - specifies a mask of X'0000'

Note:
Specifying PF1 also specifies PF13, PF2 specifies PF14, etc.

Return Codes

A return code of 0 is issued upon normal completion of the SETEID function.

Abends

An abnormal termination may occur during execution of the SETEID function. A possible cause is that an invalid eid argument was specified.