LIBNAME Statement for the Informix Engine

Overview

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.

LIBNAME libref informix <connection-options> <LIBNAME-options>;

For general information about the LIBNAME statement that is not specific to SAS/ACCESS, see LIBNAME Statement in SAS Global Statements: Reference.

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. 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:

  • DATABASE=, HOST=, PORT=, SERVER=, USER=, USING=, (optional) CONOPTS=
  • DSN=, USER=, USING=

Here is how these options are defined.

Note: All of the following connection options are valid in the LIBNAME statement and in the CONNECT statement when you use the SQL pass-through facility (SQL procedure) to connect to your data source.
DATABASE=<'>database-name<'>

specifies the database to connect to in the data source. If the database name contains spaces, enclose the value in quotation marks.

Alias: DB=

Note: Support for this option was added in SAS 9.4M9.
DSN=<'>ODBC-data-source<'>

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.

Note: Support for this option was added in SAS 9.4M9.
TipIf you are upgrading to SAS 9.4M9, replace the SERVER= option with the DSN= option when you connect to Informix.
HOST=<'>host-name<'>

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=

Note: Support for this option was added in SAS 9.4M9.
PORT=port-value

specifies the port number that is used to connect to the specified Informix database.

Default: 14463

Note: Support for this option was added in SAS 9.4M9.
SERVER=<'>server-name<'>

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.

TipIf you are upgrading to SAS 9.4M9, replace the SERVER= option with the DSN= option when you connect to Informix.

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.

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.

Alias: PASSWORD=, PWD=

DBDATASRC=<'>database-data-source<'>

environment variable that lets you specify 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 details, see LIBNAME Options for Relational Databases.

SAS/ACCESS LIBNAME Options for Informix

Option

Default Value

ACCESS=

none

AUTHDOMAIN=

none

AUTOCOMMIT=

YES

BL_INFORMIXDIR=

none

BULKLOAD=

NO

BULKUNLOAD=

NO

CONNECTION=

SHAREDREAD

CONNECTION_GROUP=

none

CONOPTS=

none

DBCOMMIT=

1000 when inserting rows; 0 when updating rows

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 THREADED_APPS,3

DBTYPE=

based on default data type conversions

DEFER=

NO

DIRECT_EXE=

none

DIRECT_SQL=

YES

INSERTBUFF=

automatically calculated based on row size

LOCKTABLE=

no locking

LOCKTIME=

none

LOCKWAIT=

not specified

MULTI_DATASRC_OPT=

NONE

POST_STMT_OPTS=

none

PRESERVE_COL_NAMES=

NO

PRESERVE_TAB_NAMES=

NO

READ_ISOLATION_LEVEL=

COMMITTED READ (see Locking in the Informix Interface)

READBUFF=

automatically calculated based on row length

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=myusr1 using=mypwd1 server=mysrv1;

USER=, USING=, and SERVER= are connection options in this example.

Last updated: February 3, 2026