LIBNAME Statement Specifics for Sybase IQ

Overview

This section describes the LIBNAME statement that SAS/ACCESS Interface to Sybase IQ supports and includes examples. For details about this feature, see the LIBNAME statement.
Here is the LIBNAME statement syntax for accessing Sybase IQ.
LIBNAME libref sybaseiq <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.
sybaseiq
specifies the SAS/ACCESS engine name for the SybaseIQ 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 the Sybase IQ database in two ways. Specify only one of these methods for each connection because they are mutually exclusive.
  • HOST=, SERVER=, DATABASE=, PORT=, USER=, PASSWORD=
  • DSN=, USER=, PASSWORD=
Here is how these options are defined.
HOST=<'>server-name<'>
specifies the host name or IP address where the Sybase IQ database is running. If the server name contains spaces or nonalphanumeric characters, you must enclose it in quotation marks.
SERVER=<'>server-name<'>
specifies the Sybase IQ server name, also known as the engine name. If the server name contains spaces or nonalphanumeric characters, you must enclose it in quotation marks.
DATABASE=<'>database-name<'>
specifies the Sybase IQ database that contains the tables and views that you want to access. If the database name contains spaces or nonalphanumeric characters, you must enclose it in quotation marks.
Alias: DB=
PORT=port
specifies the port number that is used to connect to the specified Sybase IQ database. If you do not specify a port, the default is 2638.
USER=<'>Sybase IQ-user-name<'>
specifies the Sybase IQ user name (also called the user ID) that you use to connect to your database. If the user name contains spaces or nonalphanumeric characters, you must enclose it in quotation marks.
PASSWORD=<'>Sybase IQ-password<'>
specifies the password that is associated with your Sybase IQ user name. If the password contains spaces or nonalphanumeric characters, you must enclose it in quotation marks. You can also specify PASSWORD= with the PWD=, PASS=, and PW= aliases.
DSN=<'>Sybase IQ-data-source<'>
specifies the configured Sybase IQ ODBC data source to which you want to connect. Use this option if you have existing Sybase IQ ODBC data sources that are configured on your client. This method requires additional setup—either through the ODBC Administrator control panel on Windows platforms or through the odbc.ini file or a similarly named configuration file on UNIX platforms. So it is recommended that you use this connection method only if you have existing, functioning data sources that have been defined.
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 Sybase IQ, with the applicable default values. For more detail about these options, see LIBNAME Options for Relational Databases.

Sybase IQ LIBNAME Statement Example

In this example, HOST=, SERVER=, DATABASE=, USER=, and PASSWORD= are connection options.
libname mydblib sybaseiq host=iqsvr1 server=iqsrv1_users
   db=users user=iqusr1 password=iqpwd1;

proc print data=mydblib.customers;
   where state='CA';
run;
In the next example, DSN=, USER=, and PASSWORD= are connection options. The SybaseIQ SQL data source is configured in the ODBC Administrator Control Panel on Windows platforms or in the odbc.ini file or a similarly named configuration file on UNIX platforms.
libname mydblib sybaseiq DSN=SybaseIQSQL user=iqusr1 password=iqpwd1;

proc print data=mydblib.customers;
   where state='CA';
run;