In addition to the usual CICS control blocks, each task in a command-level environment has a control block known as the EXEC interface block (EIB) associated with it.

An application program can access all of the fields in the EIB by name. The EIB contains information that is useful during the execution of an application program, such as the transaction identifier, the time and date (initially when the task is started, and subsequently, if updated by the application program using ASKTIME), and the cursor position on a display device. The EIB also contains information that is helpful when a dump is used to debug a program.

Some of the most commonly used EIB information is given below:

  • EIBAID - Attention-id.
  • EIBCALEN - Length of DFHCOMMAREA (S9 (4) COMP)
  • EIBDATE - Date when this task started (S9 (4) COMP-3, 000yydd+)
  • EIBFN - Function code of the last command (2 bytes)
  • EIBRCODE - Response code of the last function (6 bytes)
  • EIBTASKN - Task number of this task (S9 (7) COMP-3)
  • EIBTIME - Time when this task started (S9 (7) COMP-3, Ohhmmss+)
  • EIBTRMID - Terminal-id (1 to 4 characters)
  • EIBTRNID - Transaction-id (1 to 4 characters)

After every CICS command is executed, the field EIBFN contains a code that indicates which command function was specified on the command. EIBFN is a two-byte field in which CICS stores a hexadecimal code that corresponds to a particular command function.

The first byte (byte 0) of the EIBFN indicates which management module was invoked to execute the command. For example, a code of hexadecimal 04 (X'04') indicates that a Terminal management command was issued. X '06' means that a file control command was issued. The second byte (byte 1) of the EIBFN indicates which command function was specified by the program. For example:

  • X'0402' indicates that the Terminal Management RECEIVE command was issued.
  • X'0404' means that the Terminal Management SEND command was executed.
  • X'0602' indicates File Control READ command.
  • X'0604' means File Control WRITE command.

A complete list of the EIBFN codes is given in the section on EIB in the CICS Application Programmer's Reference Manual (APRM). To determine which command was most recently issued an application program can access a table that lists the possible EIBFN values and the corresponding command function. The program can search this table and when a match is found, the command function name can be used to send the message to the terminal user.

If you use the HANDLE CONDITION ERROR option or the NOHANDLE option to account for command related exception conditions, you may need to examine the command response code in the EIB to determine the nature of the error.

EIBRCODE is a six-byte character field in EIB as said above. Even though the field is defined as a character field, its contents are stored as hexadecimal values. A normal command response is always indicated by 6 bytes of hexadecimal zeros (6X'0O'). If an exception condition occurs, EIBRCODE describes the nature of the error.

The first byte of the EIBRCODE(byte 0) indicates which exception condition occurred when the command was executed. For example, a value of X'ET in the first byte of the EIBRCODE means that a length error has occurred. The remaining portion of the EIBRCODE contains additional information about the error indicated in the first byte field. A list of the common response codes is given at the end of this section.

Thus by combining the EIBFN with the EIBRCODE when an exception occurs, an application program can determine which command was issued and which exception condition has occurred.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

IBM Mainframe Topics