The CICS_EpiAddTerminal and CICS_EpiAddExTerminal functions return a terminal index, which must be passed on subsequent EPI function calls to indicate the terminal to which the function is to apply. Each index identifies a combination of server name and terminal ID. The terminal index supplied is the first available integer starting from 0.
Terminal indexes are unique within a Client application, but not across applications, so each application gets terminal index zero for the first terminal it installs, and so on.
When the terminal has been deleted, the terminal index value becomes free and can be reused when another terminal is added. The server deletes the terminal if it was autoinstalled.