This post shows how you can create a SAS Data Step View that will give you access to the Columns from tables that are registered in SAS Metadata.  Using this View you can leverage this information to help make you and your team more productive.  For example you could create a Web Report that would dynamically show you what columns are in what tables.


This example provides data step code that will query the SAS Metadata and return a list of Columns from Tables registered in Metadata. The code as-is will create a data step view in the work library, so each time it is accessed it will dynamically query the SAS Metadata.

How to use it

The data step code below assumes that the connection to your Metadata Server has already been configured using the following System Options:

If you are running this code via an IOM client (e.g. Enterprise Guide, DI Studio, etc.) then these options will already be set to the user you have logged into SAS with.  If you are running this code from Base SAS you will need to issue an OPTIONS statement to set them.
Because access to the SAS Metadata requires security authorisation, the list of objects returned will be dependent on what the user specified in the METAUSER/METAPASS options can access.


Columns in Table Metadata