External Call Interface

The External Call Interface (ECI) enables a non-CICS application that is running on the client machine, to call a CICS® server program that is running on a CICS region. The client program can call the server program synchronously or asynchronously as a subroutine. The client application communicates with the CICS server program by using a data area called COMMAREA, which is passed to the CICS region on the call. The CICS server program typically populates the COMMAREA with data that is accessed from files or databases, then returns the data to the client for manipulation or display. The CICS server program cannot perform terminal I/O, but can access and update all other CICS resources.

ECI enables the design of new applications to be optimized for client⁄server operation. (The ECI is the recommended interface for developing new client⁄server applications.) Its call structure easily divides the presentation logic (that is usually in the client) from the business logic that is in the CICS server application. It therefore offers application designers maximum flexibility. For example, the ECI can be used with mainframe CICS applications that are already divided into business logic (in the application-owning region) and presentation logic (in the terminal-owning region). The business logic can remain unaltered when the presentation logic is developed to use the ECI.

With the ECI, you can write applications that do the following:
  • Call a CICS program in a CICS region from a non-CICS program
  • Connect to several servers at the same time
  • Have several outstanding program calls at the same time
  • Access CICS programs, files, transient data queues, temporary storage, and transactions
  • Exchange data between the client and the server

Synchronous calls that are made by an ECI application return control when the called server program completes; the information returned is immediately available. Asynchronous calls return control without waiting for the called server program to complete, and the ECI application is notified when the information becomes available.

Calls can be extended; that is, a single logical unit of work can cover more than one successive call, although only one call can be active for each logical unit of work at a time. The application can manage multiple logical units of work concurrently if it uses asynchronous calls.

The called server program can do the following:
  • Update resources on its own CICS region
  • Use distributed program link (DPL) to call programs on other CICS regions
  • Access resources on other CICS regions by using function shipping or distributed transaction processing (DTP)
ECI provides three types of calls:
  • Program link calls that cause a CICS program to be executed on a CICS region
  • Status information calls that retrieve status information about the application and its connection to the CICS region
  • Reply solicitation calls that retrieve information after asynchronous program link or asynchronous status information calls

With the ECI, you can also retrieve information about available servers to which the calls are directed.