Returns the value of the DB2INSTANCE environment variable.
Authorization
None
Required Connection
None
Version
sqlenv.h
C API Syntax
/* File: sqlenv.h */ /* API: Get Instance */ /* ... */ SQL_API_RC SQL_API_FN sqlegins ( _SQLOLDCHAR * pInstance, struct sqlca * pSqlca); /* ... */ |
Generic API Syntax
/* File: sqlenv.h */ /* API: Get Instance */ /* ... */ SQL_API_RC SQL_API_FN sqlggins ( struct sqlca * pSqlca, _SQLOLDCHAR * pInstance); /* ... */ |
API Parameters
REXX API Syntax
GET INSTANCE INTO :instance |
REXX API Parameters
Sample Programs
Usage Notes
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.