DB2 10.5 for Linux, UNIX, and Windows

SQLAllocEnv function (CLI) - Allocate environment handle

In ODBC 3.0, SQLAllocEnv() has been deprecated and replaced with SQLAllocHandle(). Although this version of CLI continues to support SQLAllocEnv(), use SQLAllocHandle() in your CLI programs so that they conform to the latest standards.

Migrating to the new function

The statement:
   SQLAllocEnv(&henv);
for example, would be rewritten using the new function as:
   SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &henv);