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.
For general information about the LIBNAME statement that is not specific to SAS/ACCESS, see LIBNAME Statement in SAS Global Statements: Reference.
any SAS name that serves as an alias to associate SAS with a database, schema, server, or group of tables and views.
sapasethe SAS/ACCESS engine name for the SAP ASE interface.
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.
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.
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=
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=
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.
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.
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.
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.
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..
|
Option |
Default Value |
Valid in CONNECT |
|---|---|---|
|
none |
|
|
|
none |
● |
|
|
YES |
● |
|
|
UNIQUE when data source supports only one cursor per connection; otherwise, SHAREDREAD |
● |
|
|
none |
● |
|
|
1000 (when inserting rows), 0 (when updating rows) |
|
|
|
none |
● |
|
|
none |
● |
|
|
none |
|
|
|
DBMS |
● |
|
|
NO |
|
|
|
none |
|
|
|
none |
|
|
|
the local database |
● |
|
|
1024 |
● |
|
|
NO |
● |
|
|
COMPAT |
|
|
|
usually 1 |
● |
|
|
THREADED_APPS,2 or THREADED_APPS,3 |
|
|
|
NO |
● |
|
|
none |
|
|
|
YES |
|
|
|
YES |
|
|
|
none |
● |
|
|
25 |
● |
|
|
NONE |
|
|
|
none |
|
|
|
server value |
● |
|
|
NO |
|
|
|
100 |
● |
|
|
1 (see Locking in the SAP ASE Interface) |
● |
|
|
NOLOCK (see Locking in the SAP ASE Interface) |
● |
|
|
NO |
|
|
|
none |
|
|
|
YES |
|
|
|
none |
|
|
|
none |
|
|
|
NO |
|
|
|
1 (see Locking in the SAP ASE Interface) |
|
|
|
PAGE (see Locking in the SAP ASE Interface) |
|
|
|
NO |
|
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.