Sybase environment variables

There are required and optional environment variables for Sybase data sources. These variables are set in the db2dj.ini file.

The following environment variables are valid for Sybase:
  • DB2LIBPATH
  • SYBASE
  • SYBASE_OCS
  • SYBASE_CHARSET (optional)

Variable descriptions

DB2LIBPATH
DB2LIBPATH is required by Federation when Sybase wrapper is used. Specifies the environment variable to the directory path where the Sybase client library is located. Specify the fully qualified path for the environment variable:
DB2LIBPATH=sybase_home_directory/lib
For example, if the Sybase home directory is /usr/sybase/v125, specify the following value for the DB2LIBPATH environment variable in the db2dj.ini file:
DB2LIBPATH=/usr/sybase/v125/lib
SYBASE

Specifies the directory path where the Sybase Open Client software is installed. Specify the fully qualified path for this environment variable.

For example, if Sybase Open Client Version 12.5 is installed in the directory path D:\djxclient\sybase\V125, specify the following SYBASE environment variable:
SYBASE=D:\djxclient\sybase\V125
If Sybase Open Client Version 12.0 is installed in the directory path D:\djxclient\sybase\V12, specify the following value for the SYBASE environment variable:
SYBASE=D:\djxclient\sybase\V12
SYBASE_OCS
Specifies the directory, version and release of the Sybase Open Client software that is installed. Do not specify the fully qualified path when you specify this environment variable.
SYBASE_OCS=OCS-version_release
For example, if Sybase Open Client Version 12.0 is installed in the directory path D:\djxclient\sybase\V12\OCS-12_0, specify the following value for the SYBASE_OCS environment variable:
 SYBASE_OCS=OCS-12_0
If Sybase Open Client Version 12.5 is installed in the directory path D:\djxclient\sybase\V125\OCS-12_5, specify the following value for the SYBASE_OCS environment variable:
 SYBASE_OCS=OCS-12_5
SYBASE_CHARSET
Specifies the name of the character set that you want to use. Set the SYBASE_CHARSET environment variable to the codeset that you specify in the CODESET parameter of the federated server. A list of valid character set names exists in the $SYBASE\charsets directory.
The codesets are specified differently between the CODESET parameter and SYBASE_CHARSET environment variable. For example, if you set the CODESET parameter to the 8-bit Unicode Transformation Format, UTF-8, then specify UTF8 in the SYBASE_CHARSET environment variable:
SYBASE_CHARSET=utf8 

If you do not set the SYBASE_CHARSET environment variable, the wrapper uses the Sybase character set that matches the one that is specified on the code page of the federated database. If there is no matching Sybase character set, the wrapper uses the iso_1 character set.