Chapter Contents |
Previous |
Next |
SAS ODBC Driver User's Guide and Programmer's Reference |
The SAS ODBC driver uses a SAS server to access your data sources. To access local data, the driver uses a SAS ODBC server. To access remote data, it uses a SAS/SHARE server. (See SAS Servers for more information.)
This section explains how to provide the SAS ODBC driver with necessary information about the server(s) you will be using.
Servers
tab in the SAS ODBC Driver Configuration dialog to go to the
Servers page. Supply the information described in the following steps. If
at any time 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 the SAS server that you are defining. If you supply
a one-part name such as
shr1
, the SAS ODBC driver infers that
the server is local. If you supply a two-part name such as
machine.shr2
, the driver infers that the server is remote.
ID=
field in PROC SERVER (the SAS/SHARE
server that is running on the remote host), and the server-name
that you (or your server administrator) specified when you defined the server
as a service in the TCP/IP SERVICES file. See The TCP/IP Services File for more
information.
Password
field. This should be the same password
that was specified for the
UAPW=
option in PROC SERVER (for a
SAS/SHARE server), or in PROC ODBCSERV
(for a local access server).
Local (Single User)
is displayed in the
SAS Server Type
field. If the server is a SAS/SHARE
server (used by multiple users),
SAS/SHARE (Multi-User)
is displayed.
Name
field of the Servers page (Servers Page), then the SAS ODBC driver
infers that you are using a local SAS server. The Local Options dialog appears.
When you access a local SAS data source from an ODBC-compliant application, the SAS ODBC driver uses the information in this dialog to invoke a SAS ODBC server, provided there isn't one already running. (If a SAS ODBC server is already running, the driver finds it and connects to it.) Each field contains default values that you can change by typing over them.
Path:
c:\sas\sas.exe
. If this field is
empty, then no attempt is made to start a SAS ODBC server when you connect
to your data source.Working Directory:
c:\sas
.Startup Parameters:
-initstmt
) executes a SAS
macro (
%sasodbc
), which in turn invokes the ODBC server.
The
shr1
value is only an example. It is a SAS macro
parameter whose value is taken from the name that you specified in the
Name
field of the Servers page (Servers Page). The
-icon
option specifies
that the server session should be invoked in iconified mode, because no interaction
with the server is required. The
-nologo
option (not shown)
specifies that the SAS session will be invoked without displaying the SAS
System logo and copyright information.
The
%sasodbc
macro is shipped with the
SAS System and is found in !SASROOT\CORE\SASMACRO\SASODBC.SAS.(footnote 1) The SASODBC.SAS file executes the SAS procedure PROC
ODBCSERV.
The SASODBC.SAS file can be modified to add additional SAS system options or SAS statements such as the LIBNAME statements mentioned in Defining Libraries at Server Startup Time. You can also specify options for PROC ODBCSERV. The available options are the same as those for PROC SERVER. See the SAS/SHARE User's Guide for details.
If your SAS session is installed on a network drive
and is shared by multiple users, then you probably don't want individual users
to modify the SASODBC.SAS file. Instead, users can make their own copies
of the file and can store them in their personal libraries. In this case,
they must also add the
-sasautos
option either to the
Startup Parameters
field or to their local CONFIG.SAS file to indicate
the pathname for the library, as in the following example:
-sasautos c:\programs\sas
For more information about SAS system options and SAS statements, see the SAS documentation for the Microsoft Windows or Microsoft Windows NT operating environment.
Timeout:
Supply the requested information in the dialog as follows:
Server Address:
Name
field of the Servers
page (Servers Page).
In a complex networking environment, you may need to supply a fully qualified
domain address for the server (for example,
machine.sas.com
).User Name:
User Password:
Server User Name
without
a
Server User Password
, then you will be prompted for a password at connection
time.Connect Options:
DBQ='tmp' HOST='bigone.unx.sas.com' SERV='5129'where:
DBQ is the SPDS server libname domain. | |
HOST is the location of the host computer on your network where the SPDS nameserver is running. | |
SERV is the port number of the SPDS name server running on the HOST. |
See the documentation shipped with the SPDS server for more details.
Deleting a Server Definition |
To delete a previously defined server, do the following:
Servers
list at the left of the Servers page.
Modifying a Server Definition |
Servers
list at the left of the Servers page.
Password
field. Select [Configure] to make
changes in the Local Options or SAS/SHARE Options
dialogs (Local Options Dialog
and SAS/SHARE Options Dialog).
The
Name
field is greyed out to indicate
that you cannot change the name of the server. The reason for this is that
you may have already defined data sources that use that server; if you changed
the server name, then you would no longer be able to access those data sources.
For instructions on how to specify a different server for a data source that you have already defined, see Specifying a Different Server for a Defined Data Source.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.