HANDLE AID

Handle attention identifiers (AIDs).

HANDLE AID

Read syntax diagramSkip visual syntax diagramHANDLE AIDANYKEY( label)CLEAR( label)CLRPARTN( label)ENTER( label)LIGHTPEN( label)OPERID( label)PA1-PA3( label)PF1-PF24( label)TRIGGER( label)

Condition: INVREQ

This command is threadsafe.

Description

You can use the HANDLE AID command to specify the label to which control is to be passed when an AID is received from a display device. Control is passed after the input command is completed; that is, after any data received in addition to the AID has been passed to the application program.

Restriction: This command is supported only in COBOL, PL/I, and assembler language applications (but not AMODE(64) assembler language applications). It is not supported in all other supported high level languages.

To ignore an AID, issue a HANDLE AID command that specifies the associated option without a label. This deactivates the effect of that option in any previously-issued HANDLE AID command.

If no HANDLE AID commands are in effect, that is, none have been issued or all have been canceled, control returns to the application program at the instruction immediately following the input command. Look in EIBAID to determine which key was pressed.

You can specify the following options:
  • ANYKEY (any PA key, any PF key, or the CLEAR key, but not ENTER)
  • CLEAR (for the key of that name)
  • CLRPARTN (for the key of that name)
  • ENTER (for the key of that name)
  • LIGHTPEN (for a light-pen attention)
  • OPERID (for the operator identification card reader, the magnetic slot reader (MSR), or the extended MSR (MSRE)
  • PA1, PA2, or PA3 (any of the program access keys)
  • PF1 through PF24 (any of the function keys)
  • TRIGGER (for a trigger field attention)

You cannot include more than 16 options in the same command.

If a task is initiated from a terminal by means of an AID, the first RECEIVE command in the task does not read from the terminal but copies only the input buffer (even if the length of the data is zero) so that control can be passed by means of a HANDLE AID command for that AID.

For the standard attention identifier list (DFHAID), and the standard attribute and printer control character list (DFHBMSCA), see BMS-related constants.

The label receives control in the same execution key as the execution key that the program was running in when the HANDLE AID command was issued.

A print key specified by the system PRINT initialization parameter takes precedence over a HANDLE AID command.

Conditions

16 INVREQ
RESP2 values:
200
The command was issued by a distributed program link server application.

Default action: terminate the task abnormally.

Example

The following example shows a HANDLE AID command that specifies one label for the PA1 key, and a second label for CLEAR, PA2, PA3, and all the function keys except PF10. If a PF10 AID is received, or ENTER is pressed, control returns to the application program at the instruction immediately following the input command.
EXEC CICS HANDLE AID PA1(LAB1)
     ANYKEY(LAB2) PF10