LIBNAME Statement for the Aster Engine

Overview

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.

LIBNAME libref aster <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.

aster

specifies the SAS/ACCESS engine name for the Aster 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 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.

Note: All of the following connection options are also valid in the CONNECT statement when you use the SQL pass-through facility (SQL procedure) to connect to your DBMS.
SERVER=<'>server-name<'>

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.

DATABASE=<'>database-name<'>

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.

PORT=port

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.

USER=<'>Aster-user-name<'>

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.

PASSWORD=<'>Aster-password<'>

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.

DSN=<'>Aster-data-source<'>

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.

NOPROMPT=<'>Aster-ODBC-connection-options<'>

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.

PROMPT=<'> Aster-ODBC-connection-options<'>

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.

REQUIRED=<'>Aster-ODBC-connection-options<'>

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.

LIBNAME -options

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.

SAS/ACCESS LIBNAME Options for Aster

Option

Default Value

Valid in CONNECT

ACCESS=

none

AUTHDOMAIN=

none

AUTOCOMMIT=

operation-specific

BL_DEFAULT_DIR=

temporary file directory that is specified by the UTILLOC= system option

BULKUNLOAD=

NO

CONNECTION=

UNIQUE

CONNECTION_GROUP=

none

CONOPTS=

none

DBCLIENT_MAX_BYTES=

matches the maximum number of bytes per single character of the SAS session encoding

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

DBMAX_TEXT=

1024

DBMSTEMP=

NO

DBNULLKEYS=

YES

DBPROMPT=

NO

DBSASLABEL=

COMPAT

DEFER=

NO

DELETE_MULT_ROWS=

NO

DIMENSION=

NO

DIRECT_EXE=

none

DIRECT_SQL=

YES

IGNORE_READ_ONLY_COLUMNS=

NO

INSERTBUFF=

automatically calculated based on row length

LOGIN_TIMEOUT=

0

MULTI_DATASRC_OPT=

NONE

PARTITION_KEY=

none

POST_STMT_OPTS=

none

PRESERVE_COL_NAMES=

see Naming Conventions for Aster

PRESERVE_TAB_NAMES=

see Naming Conventions for Aster

QUERY_TIMEOUT=

0

QUOTE_CHAR=

none

READBUFF=

automatically calculated based on row length

REREAD_EXPOSURE=

NO

SCHEMA=

none

SPOOL=

YES

SQL_FUNCTIONS=

none

SQL_FUNCTIONS_COPY=

none

SQLGENERATION=

none

STRINGDATES=

NO

TRACE=

NO

TRACEFILE=

none

UPDATE_MULT_ROWS=

NO

USE_ODBC_CL=

NO

UTILCONN_TRANSIENT=

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.

Aster LIBNAME Statement Examples

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.
Last updated: February 3, 2026