SAS/ACCESS Interface 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 Overview of the LIBNAME Statement for Relational Databases.
Here is the LIBNAME statement syntax for accessing Informix.
LIBNAME libref informix <connection-options> <LIBNAME-options>; |
Arguments |
specifies any SAS name that serves as an alias to associate SAS with a database, schema, server, or group of tables and views.
specifies the SAS/ACCESS engine name for the Informix interface.
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.
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.
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.
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=.
environment variable that lets you set a default data source. This value is used if you do not specify a SERVER= connection option.
define how SAS processes DBMS objects. Some LIBNAME options can enhance performance, while 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.
Option | Default Value |
---|---|
ACCESS= |
none |
AUTHDOMAIN= |
none |
AUTOCOMMIT= |
YES |
CONNECTION= |
SHAREDREAD |
CONNECTION_GROUP= |
none |
DBCOMMIT= |
1000 (insert) or 0 (update) |
DBCONINIT= |
none |
DBCONTERM= |
none |
DBCREATE_TABLE_OPTS= |
none |
DBGEN_NAME= |
DBMS |
DBINDEX= |
NO |
DBLIBINIT= |
none |
DBLIBTERM= |
none |
DBNULLKEYS= |
NO |
DBPROMPT= |
NO |
DBSASLABEL= |
COMPAT |
DBSLICEPARM= |
THREADED_APPS,2 or 3 |
DEFER= |
NO |
DIRECT_EXE=DIRECT_EXE= | none |
DIRECT_SQL= |
YES |
LOCKTABLE= |
no locking |
LOCKTIME= |
none |
LOCKWAIT= |
not set |
MULTI_DATASRC_OPT= |
NONE |
PRESERVE_COL_NAMES= |
NO |
PRESERVE_TAB_NAMES= |
NO |
READ_ISOLATION_LEVEL= |
COMMITTED READ (see Locking in the Informix Interface) |
REREAD_EXPOSURE= |
NO |
SCHEMA= |
your user name |
SPOOL= |
YES |
SQL_FUNCTIONS= |
none |
UTILCONN_TRANSIENT= |
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.
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.