Before an application can initialize Client-Library, it must allocate a CS_CONTEXT, or context, structure.
A CS_CONTEXT structure stores configuration information that describes a particular context, or operating environment, for a set of server connections. CS_CONTEXT is shared by CS-Library, Client-Library, and Server-Library. A CS_CONTEXT structure is allocated and dropped using the CS-Library routines cs_ctx_alloc and cs_ctx_drop.
Although an application can use more than one context, a simple application typically requires only one.
An Open Client application that is running under CICS on an IBM host is restricted to one context per application.
Some context information is stored in the form of properties. Properties have values that an application can change to customize a context. Properties include CS_MAX_CONNECT, which defines the maximum number of connections allowed within the context, and CS_NETIO, which determines whether or a context’s connections default to synchronous or asynchronous behavior.
Connection and command structures also have properties. When a connection is allocated, it picks up default property values from its parent context. When a command structure is allocated, it picks up default property values from its parent connection.
See the “Properties” topics page in the Open Client Client-Library/C Reference Manual.