LIBNAME Statement Specifics for Informix

Overview

This section describes the LIBNAME statement that SAS/ACCESS Interface to Informix supports and includes an example. For details about this feature, see the LIBNAME statement.
Here is the LIBNAME statement syntax for accessing Informix.
LIBNAME libref informix <connection-options> <LIBNAME-options>;

Arguments

libref
specifies any SAS name that serves as an alias to associate SAS with a database, schema, server, or group of tables and views.
informix
specifies the SAS/ACCESS engine name for the Informix interface.
connection-options
provide connection information and control how SAS manages the timing and concurrence of the connection to the DBMS. Here is how these options are defined.
USER=<'>Informix-user-name<'>
specifies the Informix user name that you use to connect to the database that contains the tables and views that you want to access. If you omit the USER= option, your operating environment account name is used, if applicable to your operating environment.
USING=<'>Informix-password<'>
specifies the password that is associated with the Informix user. If you omit the password, Informix uses the password in the /etc/password file.
USING= can also be specified with the PASSWORD= and PWD= aliases.
SERVER=<'>ODBC-data-source<'>
specifies the ODBC data source to which you want to connect. An error occurs if the SERVER= option is not set. For UNIX platforms, you must configure the data source by modifying the odbc.ini file. See your ODBC driver documentation for details.
For the SAS/ACCESS 9 Interface to Informix, the Informix ODBC Driver API is used to connect to Informix, and connection options have changed accordingly. The DATABASE= option from the SAS 8 version of SAS/ACCESS was removed. If you need to specify a database, set it in the odbc.ini file. For SERVER= options, instead of specifying the server name, as in SAS 8, specify an ODBC data source name. You can also use a user ID and password with SERVER=.
DBDATASRC=<'>database-data-source<'>
environment variable that lets you set a default data source. This value is used if you do not specify a SERVER= connection option.
LIBNAME-options
define how SAS processes DBMS objects. Some LIBNAME options can enhance performance, and others determine locking or naming behavior. The following table describes the LIBNAME options for SAS/ACCESS Interface to Informix, with the applicable default values. For more detail about these options, see LIBNAME Options for Relational Databases.
SAS/ACCESS LIBNAME Options for Informix
Option
Default Value
none
none
YES
SHAREDREAD
none
1000 when inserting rows; 0 when updating rows
none
none
none
DBMS
NO
none
none
NO
NO
COMPAT
THREADED_APPS,2 or 3
NO
none
YES
no locking
none
not set
NONE
NO
NO
COMMITTED READ (see Locking in the Informix Interface)
NO
your user name
YES
none
NO

Informix LIBNAME Statement Example

In this example, the libref MYDBLIB uses the Informix interface to connect to an Informix database:
libname mydblib informix user=testuser using=testpass server=testdsn;
In this example USER=, USING=, and SERVER= are connection options.