Hello
Is there a way to add a column of owner_name (The user ID of the person who created the data set)
by create proc sql query to dictionary.tables?
(Note- This information exist in proc contents but I want to get it also from
dictionary.tables)
proc sql;
title 'All Tables and Views in the SQL Library';
select libname, memname, memtype, nobs, put(filesize,sizekmg.) as filesize
from dictionary.tables
where libname='R_R'
order by filesize desc
;
quit;
Always risky to answer "no", but looking through dictionary.dictionaries, I don't see anything that looks like it would store information about dataset owner:
proc sql ;
select memname,name,label from dictionary.dictionaries ;
quit ;
It does NOT exist in the OUTPUT dataset generated by PROC CONTENTS. But it does appear in the PRINTED output that PROC CONTENTS generates.
The OWNER information looks like information that it gathered from the physical FILENAME that also prints in the same tabular report. You can get that information using the FINFO() function.
Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.
Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.