LIBNAME Statement Specifics for 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 the LIBNAME statement.
Here is the LIBNAME statement syntax for accessing Aster nCluster.
LIBNAME libref aster <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.
aster
specifies the SAS/ACCESS engine name for the Aster nCluster 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 Aster nCluster database in several ways. Specify only one of these methods for each connection because they are mutually exclusive.
  • SERVER=, DATABASE=, PORT=, USER=, PASSWORD=
  • DSN=, USER=, PASSWORD=
  • NOPROMPT=
  • PROMPT=
  • REQUIRED=
Here is how these options are defined.
SERVER=<'>server-name<'>
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.
DATABASE=<'>database-name<'>
Alias: DB=
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.
PORT=port
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 2406 is used.
USER=<'>Aster nCluster user-name<'>
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.
PASSWORD=<'>Aster nCluster password<'>
Alias: PASS=, PW=, PWD=
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.
DSN=<'>Aster nCluster data-source<'>
specifies the configured Aster nCluster ODBC data source to which you want to connect. Use this option if you have existing Aster nCluster 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 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.
Requirement: If you use this method, you just specify the user ID and password on the LIBNAME statement, even if these are already specified in the ODBC data source.
NOPROMPT=<'>Aster nCluster ODBC-connection-options<'>
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 is displayed to help you with the connection string.
PROMPT=<'> Aster nCluster ODBC-connection-options<'>
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. It instead 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.
REQUIRED=<'>Aster nCluster ODBC-connection-options<'>
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.
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 Aster nCluster with the applicable default values. For more detail about these options, see LIBNAME Options for Relational Databases.
SAS/ACCESS LIBNAME Options for Aster nCluster
Option
Default Value
none
none
operation-specific
UNIQUE
none
1000 when inserting rows; 0 when updating rows
none
none
none
DBMS
YES
none
none
1024
NO
YES
NO
COMPAT
NO
NO
NO
none
YES
NO
automatically calculated based on row length
0
none
none
0
none
automatically calculated based on row length
NO
none
YES
none
none
DBMS
NO
NO
none
NO
NO
NO

Aster nCluster LIBNAME Statement Examples

In this first 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. Therefore, 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 ;";
As shown above, when asterdb (contains a trailing blank) is specified as the database instead of asterdb (no trailing blank), this error results:
ERROR: CLI error trying to establish connection:
     ERROR:  Database asterdb  does not exist.