03-26-2018 03:20 AM
I am working on retrieving a list of tables and related information(e.g. source table) that were registered in Metadata.
I tried to use %mdsecds() to make this come true, but the related information is not enough to meet my requirements.
Is there any methods to locate where the metadata tables originally come from, but not the location in the SAS folder?
Thank you for your attention. I really appreciate any help you can provide.
03-26-2018 04:53 AM
The metabrowse-utility - found in display manager - is useful to see what's stored in metadata at all. You could use the metadata-functions to extract the information. I don't have an example at hand, but you will find code explaining how to get user-data from metadata with those functions, you will have to adept object names etc.
03-26-2018 05:11 AM
You can query metadata using SAS code - but it can become involved. If you look into the actual code of the %mdsec macro then you might get the idea.
For what's missing: Can you please be more specific? What is it exactly that %mdsec doesn't give you?
03-26-2018 06:40 AM
Sorry for my unclear expression.
The missing data is the original location(library) of the metadata tables before they are registered.
For example: Suppose a table named【Demo】, stored in a pre-assigned sas library【LIB】, were registered in a sas folder【Shared folder】. Although %mdsec macro can give me a location of the sas folder【Shared folder 】, what I need is the original location【LIB】 of the table.
Is there any sas code to extract that kind of data?
03-26-2018 07:09 AM
03-26-2018 11:18 AM
If you have the name of a table within the metadata like: "/folder/subfolder/tablename(Table)" there is a macro as described in
http://support.sas.com/kb/37/386.html to read out the name as libref.tableName