SAS/ACCESS Interface to Aster nCluster |
Overview |
This section describes the LIBNAME statement options that SAS/ACCESS Interface to Aster nCluster supports and includes examples. For details about this feature see Overview of the LIBNAME Statement for Relational Databases.
Here is the LIBNAME statement syntax for accessing Aster nCluster.
LIBNAME libref aster <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 Aster nCluster 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 the Aster nCluster database in two ways. Specify only one of these methods for each connection because they are mutually exclusive.
SERVER=, DATABASE=, PORT=, USER=, PASSWORD=
DSN=, USER=, PORT=
NOPROMPT=
PROMPT=
REQUIRED=
Here is how these options are defined.
specifies the host name or IP address where the Aster nCluster database is running. If the server name contains spaces or nonalphanumeric characters, you must enclose it in quotation marks.
specifies the Aster nCluster 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. You can also specify DATABASE= with the DB= alias.
specifies the port number that is used to connect to the specified Aster nCluster database. If you do not specify a port, the default port 5480 is used.
specifies the Aster nCluster 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.
specifies the password that is associated with your Aster nCluster User ID. 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.
specifies connection options for your data source or database. Separate multiple options with a semicolon. If you do not specify enough correct connection options, an error is returned. No dialog box displays to help you complete the connection string.
specifies connection options for your data source or database. Separate multiple options with a semicolon. If you do not specify enough correct connection options, an error is returned. No dialog box displays to help you with the connection string.
specifies connection options for your data source or database. Separate multiple options with a semicolon. When connection succeeds, the complete connection string is returned in the SYSDBMSG macro variable. PROMPT= does not immediately try to connect to the DBMS. Instead, it displays a dialog box that contains the values that you entered in the PROMPT= connection string. You can edit values or enter additional values in any field before you connect to the data source. This option is not supported on UNIX platforms.
specifies connection options for your data source or database. Separate multiple options with a semicolon. When connection succeeds, the complete connection string is returned in the SYSDBMSG macro variable. If you do not specify enough correct connection options, a dialog box prompts you for the connection options. REQUIRED= lets you modify only required fields in the dialog box. This option is not supported on UNIX platforms.
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 Aster nCluster with the applicable default values. For more detail about these options, see LIBNAME Options for Relational Databases.
Aster nCluster LIBNAME Statement Examples |
In this example, SERVER=, DATABASE=, USER=, and PASSWORD= are the connection options.
LIBNAME mydblib ASTER SERVER=npssrv1 DATABASE=test USER=netusr1 PASSWORD=netpwd1; PROC Print DATA=mydblib.customers; WHERE state='CA'; run;
In this next example, the DSN= option, the USER= option, and the PASSWORD= option are connection options. The Aster nCluster data source is configured in the ODBC Administrator Control Panel on Windows platforms. It is also configured in the odbc.ini file or a similarly named configuration file on UNIX platforms.
LIBNAME mydblib aster dsn=nCluster user=netusr1 password=netpwd1; PROC Print DATA=mydblib.customers; WHERE state='CA'; run;
Here is how you can use the NOPROMPT= option.
libname x aster NOPROMPT="dsn=aster;"; libname x aster NOPROMPT="DRIVER=nCluster; server=192.168.28.100; uid=username; pwd=password; database=asterdb";
This example uses the PROMPT= option. Blanks are also passed down as part of the connection options. So the specified value must immediately follow the semicolon.
libname x aster PROMPT="DRIVER=nCluster;";
The REQUIRED= option is used in this example. If you enter all needed connection options, REQUIRED= does not prompt you for any input.
libname x aster REQUIRED="DRIVER=nCluster; server=192.168.28.100; uid=username;pwd=password; database=asterdb ;";
This error results because the database was specified as asterdb, which contains a trailing blank, instead of asterdb.
ERROR: CLI error trying to establish connection: ERROR: Database asterdb does not exist.
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.