Where is my stuff? Documenting what is stored in SAS metadata

In a SAS Environment there is a lot of metadata, metadata about configuration such as server definitions, users, groups and roles and metadata about content like data, reports and jobs etc.

SAS Administrators often want to report on metadata. They want to know what reports have been developed and where they are stored, what jobs have been modified perhaps in a certain time period, where data is located, or which users are members of which groups and roles.

This documentation of SAS metadata is often very important prior to any upgrade to a new release. An inventory of configuration and content may influence the upgrade approach selected and will help to validate the success of the upgrade.

There are many ways to accomplish this in SAS, but until recently none of them have been particularly easy. In the past we have used programming interfaces to metadata such as the metadata data step functions or PROC metadata to develop SAS programs which create these reports. The SAS(R) 9.4 Language Interfaces to Metadata documentation provides two examples of this in the section Examples: Using Metadata Language Elements to Create Reports

In SAS 9.4 there are a couple of ways that are quicker and simpler than writing your own code (I know, it is not as much fun). In this blog we will look at satisfying two of the most commonly requested metadata reports. Firstly a report of all users and their group and role membership, and secondly a list of all user developed content.

The SAS Intelligence Platform batch tools provide a way to report on metadata content from a command line interface. No SAS code required. The batch tools are located in the SAS install directory under SASHome in SASPlatformObjectFramework/9.4/tools. I previously blogged on the relationship reporting batch tools which report on the linkages and relationships between SAS objects. A related tool the sas-list-objects tool will create a list of metadata objects matching a search criteria. Using sas-list-objects you can search on name, description, folder location, and created or last modified date. You can also restrict your search by object type. When restricting the search by object type the correct case for the object type is required. Object types are documented in the System Administration Guide and can be browsed in SAS Management Console under Folders > System > Types.

In the execution of sas-list-objects below a list of all stored process and jobs in the metadata is output to a csv file (xml is also available).

sas-list-objects -host sasbi.demo.sas.com -port 8561 -user sasadm@saspw -password xxxxxxx -types Job StoredProcess -format csv > c:\output.txt

Changing the parameters that are passed to SAS-list-objects you can select different object types, or select a folder and list all the content of the folder and its sub-folders.

In SAS 9.4 14W41 SAS Environment Manager added the Environment Manager Service Architecture Framework. The Report Center is part of the framework and it provides a point and click interface to report on metadata. To view the reports logon to SAS Environment manager and select Analyze > Report Center to open the report center window. In report center select Products > Environment Manager > Metadata Inventory.

Let’s look at two of the reports that can satisfy the most common requests about user and group membership and an inventory of user defined content. Select Identity Report and the report will display a list of the groups and roles in the metadata and the group/role membership.

To inventory content in Environment Manager select the report titled Metadata Content. You can order the report by folder location or type of metadata. In this execution the report is ordered by metadata type and you can see a listing of jobs and one of libraries, the listing includes the folder location of the objects.

Additional reports will document what portal content has been developed and the settings and configuration of SAS servers.

As you can see in 9.4 it is now much easier to report on SAS metadata. For more information:

SAS Environment Manager using report center

Documentation on the SAS Intelligence Platform Batch Tools is in the SAS 9.4 System Administration Guide

If you need to query metadata with code:

SAS Metadata Model

SAS Language Interfaces to Metadata

SAS Global Forum Paper Hands-Off SAS Administration - Using Batch Tools to Make Your Life Easier

Where is my stuff? Documenting what is stored in SAS metadata was published on SAS Users.