LIBNAME Statement for the SAP ASE Engine

Overview

This section describes the LIBNAME statement that SAS/ACCESS Interface to SAP ASE supports. For general information about this feature, see LIBNAME Statement for Relational Databases.

Here is the LIBNAME statement syntax for accessing SAP ASE.

LIBNAME libref sapase <connection-options> <LIBNAME-options>;
Note: The previous engine name, sybase, is also accepted for this SAS/ACCESS engine.

For general information about the LIBNAME statement that is not specific to SAS/ACCESS, see LIBNAME Statement in SAS Global Statements: Reference.

Arguments

libref

any SAS name that serves as an alias to associate SAS with a database, schema, server, or group of tables and views.

sapase

the SAS/ACCESS engine name for the SAP ASE interface.

connection-options

provide connection information and control how SAS manages the timing and concurrence of the connection to the DBMS. Here are the connection options for SAP ASE. All options are all case sensitive: They are passed to SAP ASE exactly as you enter them.

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.
USER=<'>SAP-ASE-user-name<'>

specifies the SAP ASE user name (also called the login name) 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=<'>SAP-ASE-password<'>

specifies the password that is associated with the SAP ASE user name. If you omit the password, a default password of NULL is used. If the password contains spaces or nonalphanumeric characters, you must enclose it in quotation marks.

Alias: PASS=, PW=, SYBPW=

DATABASE=<'>SAP-ASE-database-name<'>

specifies the name of the SAP ASE 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. If you omit DATABASE=, the default database for your SAP ASE user name is used.

Alias: DB=

SERVER=<'>server-name<'>

specifies the server that you want to connect to. This server accesses the database that contains the tables and views that you want to access. If the server name contains lowercase, spaces, or nonalphanumeric characters, you must enclose it in quotation marks. If you omit SERVER=, the default action for your operating system occurs. On UNIX systems, the value of the environment variable DSQUERY is used if it has been specified.

INTERFACE=file-name

specifies the name and location of the SAP ASE interfaces file. This file contains the names and network addresses of all available servers on the network. If you omit this statement, the default action for your operating system occurs. INTERFACE= is not used in some operating environments. Contact your database administrator to determine whether it applies to your operating environment.

IP_CURSOR= YES | NO

specifies whether implicit PROC SQL pass-through processes multiple result data sets simultaneously. IP_CURSOR is set to NO by default. Setting it to YES allows this type of extended processing. However, it decreases performance because cursors, not result data sets, are being used. Do not set to YES unless needed.

SYBBUFSZ=number-of-rows

specifies the number of rows of DBMS data to write to the buffer. If this statement is used, the SAS/ACCESS interface view engine creates a buffer that is large enough to hold the specified number of rows. This buffer is created when the associated database table is read. The interface view engine uses SYBBUFSZ= to improve performance. If you omit this statement, no data is written to the buffer.

If you specify the appropriate system options or environment variables for your database, you can often omit the connection options. See your SAP ASE documentation for details.

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 SAP ASE, with the applicable default values. This table also identifies LIBNAME options that, when specified in a LIBNAME statement, are used in the CONNECT statement in the SQL procedure. (See column Valid in CONNECT.) For details, see LIBNAME Options for Relational Databases..

SAS/ACCESS LIBNAME Options for SAP ASE

Option

Default Value

Valid in CONNECT

ACCESS=

none

AUTHDOMAIN=

none

AUTOCOMMIT=

YES

CONNECTION=

UNIQUE when data source supports only one cursor per connection; otherwise, SHAREDREAD

CONNECTION_GROUP=

none

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

DBLINK=

the local database

DBMAX_TEXT=

1024

DBPROMPT=

NO

DBSASLABEL=

COMPAT

DBSERVER_MAX_BYTES=

usually 1

DBSLICEPARM=

THREADED_APPS,2 or THREADED_APPS,3

DEFER=

NO

DIRECT_EXE=

none

DIRECT_SQL=

YES

ENABLE_BULK=

YES

INTERFACE=

none

MAX_CONNECTS=

25

MULTI_DATASRC_OPT=

NONE

POST_STMT_OPTS=

none

PACKETSIZE=

server value

QUOTED_IDENTIFIER=

NO

READBUFF=

100

READ_ISOLATION_LEVEL=

1 (see Locking in the SAP ASE Interface)

READ_LOCK_TYPE=

NOLOCK (see Locking in the SAP ASE Interface)

REREAD_EXPOSURE=

NO

SCHEMA=

none

SPOOL=

YES

SQL_FUNCTIONS=

none

SQL_FUNCTIONS_COPY=

none

SQL_OJ_ANSI=

NO

UPDATE_ISOLATION_LEVEL=

1 (see Locking in the SAP ASE Interface)

UPDATE_LOCK_TYPE=

PAGE (see Locking in the SAP ASE Interface)

UTILCONN_TRANSIENT=

NO

SAP ASE LIBNAME Statement Example

In the following example, the libref MYDBLIB uses the SAP ASE engine to connect to an SAP ASE database. USER= and PASSWORD= are connection options.

libname mydblib sapase user=myusr1 password=mypwd1;

If you specify the appropriate system options or environment variables for your database, you can often omit the connection options. See your SAP ASE documentation for details.

Last updated: February 3, 2026