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.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.