Previous Page | Next Page

Managing Metadata Objects

Managing Libraries


About Libraries

Libraries are collections of files that are stored on a server and accessed from SAS Enterprise Guide. Libraries give SAS Enterprise Guide users convenient access to their data on servers. When you add a metadata definition for a library through SAS Enterprise Guide Explorer or SAS Management Console, you make the metadata definition available to all the network SAS Enterprise Guide installations that have access to a specific metadata repository as well as all other applications that use the repository. The metadata definition for a library includes the path, engine, and other options for the library. The metadata definition corresponds to the information that is specified in a LIBNAME statement.

Table definitions specify the tables and columns that are available within a library. You can create table definitions by using one of the following functions:

You can include authorization settings for both library and table definitions, specifying which libraries and tables a user can access and whether the user can change the contents of a library.

Note:   Before you add a library, you must use SAS Management Console to add the server on which the library resides.  [cautionend]

To define a library:

  1. Define the library's path on the server platform.

  2. Specify the SAS engine that is identified with the library.

  3. Enter any associated options that you can specify in a LIBNAME statement. LIBNAME options work like the commands in an AUTOEXEC.BAT file. The LIBNAME options are stored on the client and then executed when a SAS Enterprise Guide application connects to the specified SAS server. For more information about SAS libraries, LIBNAME statements, and LIBNAME options, see SAS Language Reference: Dictionary.


Understanding the Metadata LIBNAME Engine

To understand how SAS Enteprise Guide assigns and accesses libraries, it is helpful to understand the metadata LIBNAME engine. The engine, also called the META engine, enables you to use a LIBNAME statement to reference a metadata definition for a library, rather than specifying the physical location of the library's tables. By default, the META engine provides read-only access to a library, which prevents the library contents from being different from the library metadata.

If you use the METAOUT=DATA option in the LIBNAME statement, the META engine can access tables that are not defined in metadata but that exist in the physical library. This option enables you to add and modify tables in the library. However, any metadata authorization settings that have been applied to tables or columns in the library are enforced. If a SAS program changes the contents of a library that uses the METAOUT=DATA option, you must synchronize the physical data and the metadata. To synchronize the data, you can use the Register Tables function in SAS Management Console, the METALIB procedure, or the Update Library Metadata task in SAS Enterprise Guide.


Adding a Library

To add a library, select File [arrow] New [arrow] Library and follow the prompts on each page of the Library Wizard. Depending on the options that you select in the wizard, the number of pages in the wizard and the page on which a specific option appears might change.

Use the following information when completing the wizard:

After you complete the wizard, the library is created and then displayed in the viewer under the client libraries for the specified servers.


Creating an Output Library

By default, SAS Enterprise Guide stores output data in the Sasuser, Work, or Egtask library, or a user-created output library on the SAS server. You can select Tools [arrow] Options [arrow] Output Library to change the default output library. For example, you might want all output to go to a central library that all users can access. In addition, Sasuser is a temporary location on z/OS and some UNIX systems, so output needs to be directed to a different location in order to be saved permanently.

To define an output library, you can follow either one of these strategies:


Assigning Libraries

When you view a SAS server in SAS Enterprise Guide or SAS Enterprise Guide Explorer, you see a list of libraries on the selected server. The list includes both libraries that are assigned (identified with a yellow icon) and libraries that are unassigned (identified with a white icon).

[untitled graphic]

Assigned libraries are libraries that are pre-assigned or assigned in an autoexec program. Unassigned libraries are libraries that have been defined in metadata but have not yet been assigned or accessed. To assign an unassigned library, right-click on the library and select Assign from the pop-up menu. If the library definition was created by SAS Enterprise Guide Explorer, the library is assigned using the method that was specified in the library definition. Otherwise, the library is assigned using the META engine in its default mode, which means that the library is read-only. The library contents also match the metadata definition (so physical tables that are not defined in metadata are not displayed), and the tables and columns that are accessible depend on the authorization settings.


Updating Library Properties

Properties for libraries include information such as names, pathnames, and LIBNAME options. To view or update this information:

  1. Select a server, and then locate the library whose properties you want to change.

  2. Select the library, and then select Properties from the pop-up menu.

  3. Select the item in the selection pane that corresponds to the information that you want to update. For information about each field, see Adding a Library.

Previous Page | Next Page | Top of Page