A common question really and one that I get after posting code like yesterday's All SAS Stored Process Locations Report. The neat trick is just to type METABROWSE in a BASE SAS command window. (There are two other commands: METACON and METAFIND. Has anyone got any tips on when those would be useful?)
BASE SAS will automatically provide a connection screen to establish a link into the SAS Metadata Server.
After connecting successfully, you can navigate through a folder structure type environment.
Comparing the code from yesterday with the metabrowse view, you will notice that the same terms appear. Below is a sample where I counted all the objects within the Directory folder. I got each Name and DirectoryName at this point but only if the Name was equal to "SP Source Directory" did I move into the second do loop.
Then to move into the do loop and not get lost in my metabrowse screen I right clicked on one of the "SP Source Directory" items in the windowing environment and selected Explore from Here (Number 1 in the diagram).
I then (Number 2) retrieved the unique metadata identifier for each occurrence in the Files list then I grabbed the corresponding Filename attribute from that specific File.
Also, the rc= functions used in the data step (including metadata_getattr, metadata_getnasn, and metadata_getnobj) are all defined in the SAS Language Interfaces to Metadata Documentation. Have you found other uses for METABROWSE? What other techniques have you leveraged to generate reports on your metadata?
How did you find that metadata?
14
Share
14 Comments
Hi Angela,
great article, even if it is a bit older, it is still dealing with an up-to-date topic.
I am also a big fan of the SAS metadata environment and I love searching the metadata with the metabrowser. However what I do not find very optimal are the following issues:
-Assoziations between objects are not always directly obvious at a glance, sometimes I really have to click a lot
-the technical relationships can be very tricky so that you need some kind of knowledge and experience with SAS
That was the starting point for me to develop a tool by myself that is able to easily read out metadata and to visualize them in an attractive way for the user.
Simply because I am convinced that everyone can bring out more of his/her SAS metadata environment.
take a look at
https://www.youtube.com/watch?v=XmWWxKCjkag
greetings from Germany
Marius
Thanks Marius for the recommendation. I'm also a fan of Metacoda's plugins. https://www.metacoda.com/en/
Pingback: Leverage metadata user synchronization macros for other uses
I don't see many customers running SAS DMS anymore, they all use EG, so no metabrowse for them :(
in sas913 there was the unsupported SAS Metadata Explorer, a web front-end to the metadata with the same/better functionality as metabrowse, and no DMS required. I found it awesome. every time i have to search in metadata i get sad it's not there anymore and that i have to fall back to metabrowse.
what happened to it?
Hi Bart! Thanks for mentioning the SAS Metadata Explorer. It is actually available to customers who request a copy but it looks like it hasn't been updated since the 9.1.3 version. You could request it and try on the newer versions, I don't believe the underlying metadata has changed that significantly (save for the folder view capability in 9.2+).
will do and let you know if it works.
Great tip! I will be trying this soon!
Hi Angela,
I'm a big fan of metabrowse and also find the 'find' feature handy from time to time. Right clicking over the repository in metabrowse shows a 'Find' item in the context menu. This allows you to type in a metadata URI to locate an object (or objects). Here's an example URI to find stored processes with the word graphic in the name:
ClassifierMap?@PublicType='StoredProcess' and @Name contains 'graphic'
Cheers
Paul
Ooh! Another great tip! Thanks Paul!
Other ways you can do metadata reporting is to use Metacoda Security Plug-ins software which is installed and used within the SAS Management Console - http://www.metacoda.com/en/metacoda-security-plug-ins/ This software provides enhanced visibility of SAS metadata security implementations, in whole-of-server views to assist with reviews, troubleshooting and the ongoing governance and auditing requirements for an organization.
Definitely agree with you there Michelle! For my readers, you have probably heard about this tool before. I posted about it from SASGF12.
http://blogs.sas.com/content/bi/2012/04/24/metacoda_smc_plugin/
Amadeus Software has some similar information in a You Tube video [http://www.youtube.com/watch?v=PTRUKDVUcnM]. It's useful if you are just learning to work with the metadata.
To enable editing in metabrowse-
Click Tools->Options->Explorer->General…
Make sure the "Metadata Browse Mode" checkbox is unchecked
Click OK to close the Explorer Options
Great trick D!
For SAS Administrators, it is important to note here that editing Metadata through Metabrowse is still enforced by the authorization settings. Users will require on the objects they are trying to change WriteMetadata (WM) and possibly WriteMemberMetadata (WMM) authorizations in order to take advantage of this editing mode in BASE SAS.