Chapter Contents |
Previous |
Next |
SAS ODBC Driver User's Guide and Programmer's Reference |
Each data source can include multiple data libraries. (See SAS Data Libraries for information.) Therefore, you provide information about each library that you want to access.
This section describes how to use the Libraries page to define your data libraries. See Defining Libraries at Server Startup Time for information about an alternate way of defining data libraries.
Libraries
tab in the SAS
ODBC Driver Configuration dialog to go to the Libraries page (Libraries Page). Supply the information described
in the following steps. If at any point you want to clear all of the fields
on the right side of the dialog and start again, select [Clear].
Name
field, enter a name for an existing
physical SAS data library that you want to access. (For those who are familiar
with SAS, this field corresponds to the libref in the SAS LIBNAME
statement.) The name can be up to eight characters long. The first character
must be a letter or an underscore. Subsequent characters can be letters,
numeric digits, or underscores. Blanks and special characters are not allowed.
For example, you might use the name
cost
to designate a library
of cost-accounting data.
The SAS data library can include SAS data files, SAS data views, or both. See SAS Data Sets for more information.
Note: If you use an ODBC application that exports databases using one-level
names, you will need to define a library called
user
.
Host File
field, enter
the physical name of the library. This must be a valid pathname for the operating
system that your data library is stored on. For example, for a library that
is stored on a PC in the Windows environment,
c:\data\costacct
would
be a valid pathname.
Description
field, supply
a description of the library, to remind yourself or other users of what the
library contains.
Engine
field, enter the name of the SAS engine that
is required for writing to and reading from this library. This is necessary
only if you do not want the SAS server to use the default engine for the version
and release number of the SAS System that you are running. (For Version 8
of the SAS System, the default engine would be
V8
.) For information about
other engines that may be available, see the description of the LIBNAME statement
in the SAS Companion for the operating system under which your data library
is stored.
Options
field, you may
enter the following option for the library that you are defining:
Note: In order to honor this option, the SAS server through
which the library is accessed must be running under one of the following releases
of the SAS system:(footnote 1)
Defining Libraries at Server Startup Time |
As explained in SAS Servers, the SAS ODBC driver uses a SAS/SHARE server (invoked by PROC SERVER) to access remote data sources. It uses a SAS ODBC server (invoked by PROC ODBCSERV) to access local data sources. To define a data library at server startup time, you precede the PROC SERVER or PROC ODBCSERV statement with a SAS LIBNAME statement. For example, you could define a library of cost-accounting data to a SAS/SHARE server as follows:
libname cost 'e:\fin\acct'; proc server id=acctserv authenticate=optional; run;
Note: Depending on the version of the SAS server, the
authenticate=optional
option may not be needed.
To define this library to a SAS ODBC server, you would add only the above LIBNAME statement to the !SASROOT\CORE\SASMACRO\SASODBC.SAS file. See Startup Parameters for more information.
When a user requests access to the particular SAS ODBC data source from an ODBC client application, the server would automatically make this library available, along with any libraries that were defined via the SAS ODBC Libraries page.
For more information about the SAS LIBNAME statement, see the SAS Companion for the operating system under which your data library is stored.
Deleting a Data Library Definition |
To delete a previously defined data library, do the following:
Libraries
list at the left of the Libraries page (Libraries Page).
Modifying a Data Library Definition |
To change the information for a previously defined library, do the following:
Libraries
list on the Libraries page.
Host File
,
Description
,
Engine
, and
Options
fields.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.