Previous Page | Next Page

Connecting to Common Data Sources

Establishing Connectivity to a Library of SAS Data Sets

Register the Base SAS Library

The following figure provides a logical view of accessing a library of SAS data sets.

Establishing Shared Access to SAS Data Sets

[Establishing Shared Access to SAS Data Sets]

After you have installed the required SAS software, you need to set up a connection from a SAS server to a SAS data set. This connection requires that you register the Base SAS library with the SAS Metadata Server. In addition, you must import any user-defined formats that have been created for the data set in order to view or operate on the data. Assume that the SAS software has already been loaded by using the standard installation wizard and that the data set is stored in a location that can be accessed.

Register the library by using SAS Management Console. This metadata enables your SAS applications to access the data sets that you need to work with. For this example, the data set contains information about customers of the Orion Gold enterprise.

To register a Base SAS library, perform the following steps:

  1. In SAS Management Console, expand Data Library Manager. Right-click Libraries. Then, select the New Library option to access the first page of the New Library wizard.

  2. Select SAS BASE Library from the SAS Data list. Click Next.

  3. Enter an appropriate library name in the Name field (for example, Orion Gold Customers). Note that you can supply an optional description if you want. Click Next.

  4. Enter the following library properties:

    Library Properties
    Field Sample Value
    Path Specification
    C:\SAS\Config\Lev1\SASApp\Data (Enter the fully qualified path to the library. This path is specified differently in different operating systems. Make sure that the appropriate path is displayed in the Selected items field.)

    You can also click Advanced Options to perform tasks such as pre-assignment and setting host-specific and LIBNAME options. Click Next to access the next page of the wizard.

  5. Select one or more SAS servers. The library is available to the server or servers that you select from this list and visible to users of the server. Click Next.

  6. Examine the final page of the wizard to ensure that the proper values have been entered. Click Finish to save the settings.

At this point, you can register tables, as explained in Registering and Verifying Tables. If registering tables fails, check that the user account has host access permission to the path.

Working with User-Defined Formats

If you have existing SAS data sets, you might also have a catalog of user-defined formats and informats. You have two options for making these formats available to applications such as SAS Data Integration Studio and SAS Information Map Studio:

Use a Standard Name and Location for the Format Catalog

To make the format catalog available, in the preferred method, perform the following steps:

  1. Name the format catalog formats.sas7bcat.

  2. Place the catalog in the directory SAS-config-dir\Lev1\SASApp\SASEnvironment\SASFormats.

Create a User-Defined Formats Configuration File

Alternatively, you can create a user-defined formats configuration file in which you point to the location of the formats catalog.

To make a format catalog available using the alternative method on Windows and UNIX systems, perform the following steps:

  1. To the SAS configuration file SAS-config-dir\Lev1\SASApp\sasv9_usermods.cfg, add the CONFIG system option, and use it to point to the user-defined formats configuration file.

    -config "SAS-config-dir\Lev1\SASApp\userfmt.cfg"

  2. Then, use the FMTSEARCH system option in the same configuration file to point to the format catalog:

    -set fmtlib1 "SAS-config-dir\Lev1\Data\orformat"
    -insert fmtsearch (fmtlib1.orionfmt)

    In this example, SAS-config-dir\Lev1\Data\orformat is the location of the format catalog, and orionfmt (filename orionfmt.sas7bcat) is the name of the format catalog. If you have more than one catalog to list, leave a space between each catalog name.

    Note:   On UNIX systems, you must enter the variable name in uppercase. For example, you enter FMTLIB1 instead of fmtlib1.  [cautionend]

To make a format catalog available using the alternative method on z/OS systems, perform the following steps:

  1. Add the AUTOEXEC system option to the SAS launch command as shown in the following example.


    In this example, is your SAS launch command script, and is the name of the SAS autoexec file. When you enter the command, you must enter it all on one line.

  2. In the autoexec file, use the LIBNAME statement to assign the format library and the OPTIONS statement to set the FMTSEARCH system option. For example, you might specify the following statements:

    LIBNAME fmtlib1 'SAS-config-dir/Lev1/Data/orformat' repname=Foundation;
    options fmtsearch=(fmtlib1.orionfmt);

Previous Page | Next Page | Top of Page