This section describes the LIBNAME statement that SAS/ACCESS Interface to Informix supports. For general information about this feature, see LIBNAME Statement for Relational Databases.
Here is the LIBNAME statement syntax for accessing Informix.
For general information about the LIBNAME statement that is not specific to SAS/ACCESS, see LIBNAME Statement in SAS Global Statements: Reference.
specifies any SAS name that serves as an alias to associate SAS with a database, schema, server, or group of tables and views.
informixspecifies 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. When you use the LIBNAME statement, you can connect to Informix in multiple ways. Specify only one of these methods for each connection, because they are mutually exclusive:
Here is how these options are defined.
specifies the database to connect to in the data source. If the database name contains spaces, enclose the value in quotation marks.
Alias: DB=
specifies the ODBC data source to which you want to connect. You must configure the data source by modifying the odbc.ini file. See your ODBC driver documentation for details.
For SAS/ACCESS Interface to Informix, the Informix ODBC Driver API is used to connect to Informix. If you need to specify a database when you use the DSN= option, set it in the odbc.ini file. You can specify a user ID and password with DSN=.
Interaction: The CONOPTS= option is not supported when you specify the DSN= option.
specifies the host name or IP address where the Informix instance is running. If the name contains spaces, enclose the HOST= value in quotation marks.
Alias: SERVICE=, SERVICE_NAME=
specifies the port number that is used to connect to the specified Informix database.
Default: 14463
specifies the Informix server where the Informix database is running. The Informix ODBC Driver API is used to connect to Informix.
For SAS 9.4M9 and later, this option is not required if you specify the DSN= option instead.
For SAS 9.4M8 and earlier, this option specifies the ODBC data source to which you want to connect. An error occurs if the SERVER= option is not specified. For UNIX platforms, you must configure the data source by modifying the odbc.ini file. See your ODBC driver documentation for details.
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.
Alias: PASSWORD=, PWD=
environment variable that lets you specify 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, 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 details, see LIBNAME Options for Relational Databases.
|
Option |
Default Value |
|---|---|
|
none |
|
|
none |
|
|
YES |
|
|
none |
|
|
NO |
|
|
NO |
|
|
SHAREDREAD |
|
|
none |
|
|
none |
|
|
1000 when inserting rows; 0 when updating rows |
|
|
none |
|
|
none |
|
|
none |
|
|
DBMS |
|
|
NO |
|
|
none |
|
|
none |
|
|
NO |
|
|
NO |
|
|
COMPAT |
|
|
THREADED_APPS,2 or THREADED_APPS,3 |
|
|
based on default data type conversions |
|
|
NO |
|
|
none |
|
|
YES |
|
|
automatically calculated based on row size |
|
|
no locking |
|
|
none |
|
|
not specified |
|
|
NONE |
|
|
none |
|
|
NO |
|
|
NO |
|
|
COMMITTED READ (see Locking in the Informix Interface) |
|
|
automatically calculated based on row length |
|
|
NO |
|
|
your user name |
|
|
YES |
|
|
none |
|
|
NO |
In this example, the libref MYDBLIB uses the Informix interface to connect to an Informix database:
libname mydblib informix user=myusr1 using=mypwd1 server=mysrv1;
USER=, USING=, and SERVER= are connection options in this example.