TSO-ISPF JCL COBOL VSAM DB2 CICS Tools Articles Job Portal Forum Quiz Interview Q&A

CICS AID and HANDLE AID


There are certain attention identifiers (AID) associates with every screen. Entry screens have ENTER and PF1 (Help) keys. Query screens have PF7 (Page Up), PF8 (Page down), PF1 (Help) and so on. Based on the key pressed by the user, the processing should happen in the program. EIBAID of DFHEIBLK has the last user pressed key. It can be verified in the program after the RECEIVE command.

DFHAID:

The standard attention identifier list is DFHAID. It simplifies the testing of the contents of the EIBAID field after a Basic Mapping Support (BMS) or terminal control input operation.

The following content is present in the DFHAID copybook.

01    DFHAID.
   02  DFHNULL   PIC  X  VALUE IS ' '.
   02  DFHENTER  PIC  X  VALUE IS ''''.
   02  DFHCLEAR  PIC  X  VALUE IS '_'.
   02  DFHCLRP   PIC  X  VALUE IS '¦'.
   02  DFHPEN    PIC  X  VALUE IS '='.
   02  DFHOPID   PIC  X  VALUE IS 'W'.
   02  DFHMSRE   PIC  X  VALUE IS 'X'.
   02  DFHSTRF   PIC  X  VALUE IS 'h'.
   02  DFHTRIG   PIC  X  VALUE IS '"'.
   02  DFHPA1    PIC  X  VALUE IS '%'.
   02  DFHPA2    PIC  X  VALUE IS '>'.
   02  DFHPA3    PIC  X  VALUE IS ','.
   02  DFHPF1    PIC  X  VALUE IS '1'.
   02  DFHPF2    PIC  X  VALUE IS '2'.
   02  DFHPF3    PIC  X  VALUE IS '3'.
   02  DFHPF4    PIC  X  VALUE IS '4'.
   02  DFHPF5    PIC  X  VALUE IS '5'.
   02  DFHPF6    PIC  X  VALUE IS '6'.
   02  DFHPF7    PIC  X  VALUE IS '7'.
   02  DFHPF8    PIC  X  VALUE IS '8'.
   02  DFHPF9    PIC  X  VALUE IS '9'.
   02  DFHPF10   PIC  X  VALUE IS ':'.
   02  DFHPF11   PIC  X  VALUE IS '#'.
   02  DFHPF12   PIC  X  VALUE IS '@'.
   02  DFHPF13   PIC  X  VALUE IS 'A'.
   02  DFHPF14   PIC  X  VALUE IS 'B'.
   02  DFHPF15   PIC  X  VALUE IS 'C'.
   02  DFHPF16   PIC  X  VALUE IS 'D'.
   02  DFHPF17   PIC  X  VALUE IS 'E'.
   02  DFHPF18   PIC  X  VALUE IS 'F'.
   02  DFHPF19   PIC  X  VALUE IS 'G'.
   02  DFHPF20   PIC  X  VALUE IS 'H'.
   02  DFHPF21   PIC  X  VALUE IS 'I'.
   02  DFHPF22   PIC  X  VALUE IS '¢'.
   02  DFHPF23   PIC  X  VALUE IS '.'.
   02  DFHPF24   PIC  X  VALUE IS '<'.

For verification of values in EIBAID, Copy the standard AID list copybook provided by CICS in your program (COPY DFHAID). Now you can easily verify the key pressed as follows.

EVALUATE EIBAID
    WHEN DFHENTER
          PERFORM PARA-1
    WHEN DFHPF1
          PERFORM PARA-2
    WHEN OTHER
          PERFORM PARA-3
END-EVALUATE.

The above checking is done in COBOL and this kind of check has to be done after every RECEIVE command to properly route the flow. CICS provides its own routing processing based on the key pressed by HANDLE AID command. This will be effective through out the program and reduce the code redundancy. The routing will be automatically invoked on every RECEIVE.

EXEC CICS HANDLE AID
    DFHENTER(PARA-1)
    DFHPF1(PARA-2)
    ANYKEY(PARA-3)
END-EXEC.


If you have any doubts or queries related to this chapter, get them clarified from our Mainframe experts on ibmmainframer Community!

Are you looking for Job Change? Job Portal