Returns the value of the DB2INSTANCE environment variable.
None
None
sqlenv.h
SQL_API_RC SQL_API_FN
sqlegins (
_SQLOLDCHAR * pInstance,
struct sqlca * pSqlca);
SQL_API_RC SQL_API_FN
sqlggins (
struct sqlca * pSqlca,
_SQLOLDCHAR * pInstance);
The value in the DB2INSTANCE environment variable is not necessarily the instance to which the user is attached.
To identify the instance to which a user is currently attached, call sqleatin - Attach, with null arguments except for the sqlca structure.
GET INSTANCE INTO :instance