Working with Repositories

Overview of Working with Repositories

The Common Metadata Repository is a general-purpose metadata management facility that provides common metadata services to different SAS/EIS applications. The Common Metadata Repository enables SAS/EIS software to share metadata with other SAS products.
Complete all of the following tasks to set up the Common Metadata Repository:
Note: You must have write access to the SASHELP directory to complete these tasks.

Specifying the System Repository Manager Location

Follow these steps to specify the location of the system repository manager:
  1. Create a directory that is dedicated exclusively to the storage of repository manager files, for example:
    • Windows users: !SASROOT\RPOSMGR
    • UNIX users: !SASROOT/RPOSMGR
    This directory should not be used to store other SAS files.
    Note: This system repository manager path is used later in this task.
  2. Enter REGEDIT at a SAS command line. From the menu bar, select Toolsthen selectOptionsthen selectRegistry Editor to open the Registry Editor Options window. In the Select Registry View region, select the View All check box and then click OK. From the menu bar, select Filethen selectClose to close the Registry Editor Options window.
  3. Enter REGEDIT again at a SAS command line. Under the HKEY_SYSTEM_ROOT tree, expand CORE and REPOSITORY. Select the REPOSITORY_MGR node. From the menu bar, select Toolsthen selectOptionsthen selectRegistry Editor. Select Open HKEY_SYSTEM_ROOT for write access. Then click OK.
  4. Select the Path item in the right pane. From the pop-up menu, select Modify. Enter the path from Step 1. For example, enter !SASROOT\RPOSMGR. Click OK to close the Edit String Value window. From the menu bar, select Filethen selectClose to close the Registry Editor Options window and save the changes.

Setting Up the System Repository Manager Files

Complete the following steps to set up the necessary system repository manager files. You must have write access to SASHELP to specify the system repository manager.
  1. Create a directory that is dedicated exclusively to the storage of repository manager files, for example:
    • Windows users: !SASROOT\RPOSMGR
    • UNIX users: !SASROOT/RPOSMGR
    Do not store other SAS files in this directory.
  2. At a SAS command line, enter REPOSMGR and then select Setup Repository Manager.
  3. In the Repository Manager Setup window, Library defaults to RPOSMGR. For Path, specify the path from Step 1 and then select the Write values to system registry check box. Then click OK.
  4. In the resulting dialog box, click Yes to generate the necessary repository manager files.
This completes the set up for the System Repository Manager. You can create additional repository managers (a user repository manager, for example) by repeating these steps and by using a different path.
Note: This step sets the default location for the repository manager for your site. Individual users can override this location by executing the previous steps.

Defining the Repository to Application Dispatcher

After you set up the Repository Manager files, you must include the following statements after the PROC APPSRV statement:
ALLOCATE LIBRARY RPOSMGR 'rposmgr-path' ;
DATALIBS RPOSMGR;

Setting Up the SASHELP Repository

Complete the following steps to set up the SASHELP repository:
  1. At a SAS command line, enter REPOSMGR and then select Repository Registration.
  2. In the Repository Registration window, select New.
  3. In the Register Repository (New) window, enter SASHELP (in uppercase) in the Repository field. In the Path field, enter the full directory path where the CORE catalog is located. For example:
    • Windows users:!SASROOT\CORE\SASHELP
    • UNIX users: !SASROOT/sashelp
  4. In the Description field, you can enter any character string (for example, SASHELP Repository). Click OK to close the Register Repository (New) window. Click Close to exit the Repository Registration window.
Note: Repositories cannot span multiple directories because the path cannot contain concatenated directories. If you have existing metabases in concatenated directories, copy the metabases to a single path that is referenced as a repository.