Initializing the Gateway-Library environment

Each mainframe server application that uses Gateway-Library must initialize the operating environment. Gateway-Library uses two structures to do this:

IHANDLE

The IHANDLE structure is a transaction-wide structure that contains configuration parameters and other high-level information used to set up the operating environment for a Gateway-Library transaction. It is defined for each transaction by TDINIT.

NoteTDINIT must be the first Gateway-Library function call in each application. The IHANDLE structure corresponds to the context handle in Open Client Client-Library™.

After the environment is initialized, an application must establish a conversation between the client and the server over one of the predefined connections. In Open ServerConnect, a logical connection is represented by a TDPROC structure. A TDPROC structure is associated with an IHANDLE structure and is defined in TDACCEPT.

TDPROC

The TDPROC structure corresponds to the DBPROCESS structure in DB-Library, as well as to the connection and command handles in Client-Library. Gateway-Library sends commands to the server and returns query results to the application through the TDPROC structure.

The handle for the TDPROC structure is stored in the argument TDPROC. Every Gateway-Library function that sends or accepts data across a connection must specify that connection handle in its TDPROC argument.