When
you use CLI,
it is possible for a multithreaded application to mix CLI calls
with DB2® API calls and embedded
SQL. However, the application must explicitly manage all contexts.
This means that any thread that calls a DB2 API
or embedded SQL function or CLI must
be attached to a context explicitly by calling DB2 context APIs.
Note: It is recommended that you do not use the
default application stack size, but instead increase the stack size
to at least 256 000. DB2 requires
a minimum application stack size of 256 000 when calling a DB2 function. You must ensure therefore,
that you allocate a total stack size that is large enough for both
your application and the minimum requirements for a DB2 function call.