Setting Up a Connection to SAS/SHARE Server

The SAS ODBC Driver uses a TCP/IP network connection to communicate with a SAS/SHARE server. Use the instructions in this section to create a DSN for accessing data on a SAS/SHARE server.
  1. Access the SAS ODBC Driver Configuration dialog box.
  2. Click the Servers tab. In the Name field, enter a two-part name such as machine.shr2. SAS/SHARE (Multi-User) appears in the SAS Server Type field.
    The SAS ODBC Driver interprets the first part of the name–machine–as the host name of the SAS/SHARE server, and the second part–shr2–as the service name.
    Servers tab with a SAS/SHARE server defined.
  3. If the SAS/SHARE server is password protected, then enter the password in the Password field. The password should be the same password that was specified for the UAPW= option in PROC SERVER.
  4. Click Configure. The SAS/SHARE Options dialog box appears.
    SAS/SHARE Options Dialog Box
    SAS/SHARE Options dialog box
    Provide the requested information:
    Server Address
    is automatically filled with the alias for the TCP/IP network machine name that you specified in the Name field of the Servers tab. In a complex networking environment, you might need to provide a fully qualified domain name address for the server (for example, machine.example.com).
    User Name
    is your user ID on the system where the server is running. This field is required if the server is running in secured mode. Otherwise, it is ignored.
    User Password
    is your password on the system where the server is running. If you provide a User Name without a User Password, then you are prompted for a password at connection time. The SAS ODBC Driver encrypts the password before storing the encrypted value in the Windows registry.
    Connect Options
    Leave this field blank for a connection to a SAS/SHARE server.
    Userid/Password Override
    requests that the UID keyword and PWD keyword be used in the ODBC client application. The driver passes the value of the PWD keyword as the user login password, and the value of the UID keyword as the user ID. For more information about using this option, see Userid/Password Override.
  5. Click OK to return to the Servers tab.
    Important! Click Add to save the server definition.
  6. Click the Libraries tab.
  7. Define a library for each data library that you want to access with this DSN. In addition to the libraries that you define, you have access to any libraries that are predefined on the SAS/SHARE server and that you have permission to access. Contact your SAS/SHARE administrator for information about libraries that are predefined on the SAS/SHARE server.
    Name
    enter a name for an existing physical SAS library that you want to access. (If you are familiar with SAS, this field corresponds to the libref in the SAS LIBNAME statement.) The name can be up to eight characters. The first character must be a letter or an underscore. Subsequent characters can be letters, numeric digits, or underscores. Blank spaces and special characters are not allowed. For example, you might use the name cost to designate a library of cost accounting data. The SAS library can include SAS data files, SAS data views, or both.
    For more information, see Defining Libraries at Server Start-Up Time.
    Note: If you use an ODBC application that exports databases using one-level names, then you need to define a library called user.
    Host File
    enter the physical name of the library. This must be a valid pathname for the machine that is hosting the SAS/SHARE server. For example, e:\data and \\acctsrv\customers are valid pathnames.
    Description
    provide a description of the library to remind yourself or other users what the library contains. Providing this value is optional.
    Engine
    enter the name of the SAS engine that is required for writing to and reading from this library. This setting is necessary only if you do not want to use the V9 engine that is the default for SAS 9.2. For information about other engines that might be available, see the description of the LIBNAME statement in the SAS Companion for Windows. Providing this value is optional.
    Options
    enter options for the library that you are defining, such as ACCESS=READONLY.
  8. Click Add to save your library information. The library name is added to the list of libraries on the left.
  9. Click the General tab.
  10. Provide a name in the Data Source Name field. Use the Server menu to select the correct server for the DSN. For more information about SQL options, see SQL Options on the General Tab.
  11. Create an entry in the services file to associate the service name of the SAS/SHARE server with a TCP/IP network port:
    shr2    5010/tcp  # service name for SAS/SHARE server
Some SAS/SHARE administrators start the server with syntax that specifies a network port rather than syntax that specifies a service name. The syntax is similar to the following example, where a SAS/SHARE server is started on network port 8551:
%let tcpsec=_secure_;
proc server server=__8551 authenticate=req;
run;
This syntax removes the requirement of editing the TCP/IP services file on the machine that is hosting the SAS/SHARE server. However, on the client machine, using the SAS ODBC Driver in this environment requires special syntax for the server name on the Servers tab. You must specify the two-part name, such as machine.__8551. On the client machine, create an entry in the TCP/IP services file that is similar to the following:
__8551    8551/tcp  # SAS/SHARE server on port 8551
Contact your SAS/SHARE administrator for the network port to use. For more information about creating entries, see TCP/IP Services File.