This section describes the LIBNAME statement options that SAS/ACCESS Interface to Aster supports. For general information about this feature, see LIBNAME Statement for Relational Databases.
Here is the LIBNAME statement syntax for accessing Aster.
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.
asterspecifies the SAS/ACCESS engine name for the Aster 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 database in several ways. Specify only one of these methods for each connection because they are mutually exclusive.
Here is how these options are defined.
specifies the host name or IP address where the Aster database is running. If the server name contains spaces or nonalphanumeric characters, you must enclose it in quotation marks.
Alias: DB=
specifies the Aster 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.
specifies the port number that is used to connect to the specified Aster database. If you do not specify a port, the default port 2406 is used.
specifies the Aster 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.
Alias: PASS=, PW=, PWD=
specifies the password that is associated with your Aster user ID. If the password contains spaces or nonalphanumeric characters, you must enclose it in quotation marks.
specifies the configured Aster ODBC data source to which you want to connect. Use this option if you have existing Aster 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 specified.
Requirement: If you use this method, you just specify the user ID and password in the LIBNAME statement, even if these are already specified in the ODBC data source.
specifies connection options for your 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.
specifies connection options for your 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 in SAS Display Manager 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 database.
Restriction: This option is not supported on UNIX platforms.
specifies connection options for your 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.
specify 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 with the applicable default values. This table also identifies LIBNAME options that are valid in the CONNECT statement in the SQL procedure. For details, see LIBNAME Options for Relational Databases.
|
Option |
Default Value |
Valid in CONNECT |
|---|---|---|
|
none |
|
|
|
none |
|
|
|
operation-specific |
● |
|
|
temporary file directory that is specified by the UTILLOC= system option |
|
|
|
NO |
|
|
|
UNIQUE |
● |
|
|
none |
● |
|
|
none |
● |
|
|
matches the maximum number of bytes per single character of the SAS session encoding |
● |
|
|
1000 (when inserting rows), 0 (when updating rows) |
|
|
|
none |
● |
|
|
none |
● |
|
|
none |
|
|
|
DBMS |
● |
|
|
NO |
|
|
|
none |
|
|
|
none |
|
|
|
1024 |
● |
|
|
NO |
|
|
|
YES |
|
|
|
NO |
● |
|
|
COMPAT |
|
|
|
NO |
● |
|
|
NO |
|
|
|
NO |
|
|
|
none |
|
|
|
YES |
|
|
|
NO |
|
|
|
automatically calculated based on row length |
|
|
|
0 |
● |
|
|
NONE |
|
|
|
none |
|
|
|
none |
|
|
|
|
||
|
|
||
|
0 |
● |
|
|
none |
|
|
|
automatically calculated based on row length |
● |
|
|
NO |
● |
|
|
none |
|
|
|
YES |
|
|
|
none |
|
|
|
none |
|
|
|
none |
|
|
|
NO |
● |
|
|
NO |
● |
|
|
none |
● |
|
|
NO |
|
|
|
NO |
|
|
|
NO |
|
Use the DBCLIENT_MAX_BYTES= LIBNAME option only when necessary. When DBCLIENT_MAX_BYTES= is not specified in the LIBNAME statement, the table column CHAR length is the same as the SAS CHAR length.
In this first example, SERVER=, DATABASE=, USER=, and PASSWORD= are the connection options.
LIBNAME mydblib ASTER SERVER=mysrv1 DATABASE=test
USER=myusr1 PASSWORD=mypwd1;
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 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=aster user=myusr1 password=mypwd1;
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=aster; 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=aster;";
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=aster; 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.