EXEC Interface Block (EIB)


EIB (EXEC Interface Block) is a control block automatically created by CICS for every transaction. It contains important system-related information about the currently running transaction, such as: Transaction ID, Terminal ID, Task number, Cursor position, AID key pressed and Response codes.

Since EIB is automatically available in every CICS program, programmers can use it to retrieve important details about transaction execution and system status.

Below are the list of EIB fields available for each transaction –

Name Type Length Full Form Description
DFHEIBLKStructure0EXEC INTERFACE BLOCK
EIBAIDChar1ATTENTION IDENTIFIERContains the last attention identifier received from terminal.
EIBATTChar1ATTACH RECEIVEDIndicates the RU contains attach header data (X'FF').
EIBCALENHalf word2COMMAREA LENGTHContains the length of the communication area.
EIBCOMPLChar1DATA COMPLETEIndicates whether the data end reached during retrieval.
EIBCONFChar1CONFIRM REQUESTEDIndicates that a CONFIRM request has been received for an APPC conversation.
EIBCPOSNHalf word2CURSOR POSITIONContains the cursor position associated with the last terminal.
EIBDATE4DATE IN 0CYYDDD+ FORMAT,
where C is the century (0=1900, 1=2000),
YY is the year, DDD is the day number
Contains the date the task is started.
EIBDSChar8DATASET NAMEContains the symbolic identifier of the last data set referred in a file control request.
EIBEOCChar1EOC RECEIVEDIndicates that an end-of-chain indicator.
EIBERRChar1ERROR RECEIVEDIndicates that an error has been received on an APPC conversation.
EIBERRCDChar4ERROR CODE RECEIVEDWhen EIBERR is set, contains the error code that has been received.
EIBFMHChar1FMHS RECEIVEDIndicates that the user data received or retrieved contains an FMH.
EIBFNChar2FUNCTION CODEContains a code that identifies the last CICS command issued by the task.
EIBFREEChar1FREE REQUESTEDIndicates that the application program cannot continue using the facility.
EIBNODATChar1NO APPL DATA RECEIVEDIndicates that no data has been sent by the remote application.
EIBRCODEChar6RESPONSE CODEContains the CICS response code returned after some specific function gets executed.
EIBRECVChar1RECEIVE REQUIREDIndicates that the application program is to continue receiving data from the facility by executing RECEIVE commands.
EIBREQIDChar8REQUEST IDENTIFIERContains the request identifier assigned to an interval control command by CICS.
EIBRESPFull word4INTERNAL CONDITION NUMBERContains a number corresponding to the RESP condition that occurred.
EIBRESP2Full word4MORE DETAILS ON SOME RESPONSESContains more detailed information that can help explain why the RESP condition occurred.
EIBRLDBKChar1ROLLED BACKIndicates rollback.
EIBRSRCEChar8RESOURCE NAMEContains the symbolic identifier of the resource being accessed by the latest executed command.
EIBSIGChar1SIGNAL RECEIVEDIndicates that SIGNAL has been received.
EIBSYNCChar1SYNCPOINT REQUESTEDIndicates that the application program must take a sync point or terminate.
EIBSYNRBChar1SYNC ROLLBACK REQ'DIndicates that the application program should issue a SYNCPOINT ROLLBACK command.
EIBTASKN4TASK NUMBERContains the task number assigned to the task by CICS.
EIBTIME4TIME IN 0HHMMSS FORMATContains the time at which the task is started.
EIBTRMIDChar4TERMINAL IDENTIFIERContains the symbolic terminal identifier of the principal facility associated with the task.
EIBTRNIDChar4TRANSACTION IDENTIFIERContains the symbolic transaction identifier of the task.

Short Examples -


Scenario - COBOL program example demonstrates how to use CICS HANDLE AID to process user input based on AID keys.

...
DATA DIVISION.
WORKING-STORAGE SECTION.
01 WS-TRANS-ID       PIC X(4).
01 WS-TERMINAL-ID    PIC X(4).
01 WS-TASK-NUMBER    PIC 9(7).
..
PROCEDURE DIVISION.

    MOVE EIBTRNID TO WS-TRANS-ID.
    MOVE EIBTERMID TO WS-TERMINAL-ID.
    MOVE EIBTASKN TO WS-TASK-NUMBER.
    ...
    ...

Retrieves the transaction ID (EIBTRNID) and stores it in WS-TRANS-ID. Retrieves the terminal ID (EIBTERMID) and stores it in WS-TERMINAL-ID. Retrieves the task number (EIBTASKN) and stores it in WS-TASK-NUMBER.