BookmarkSubscribeRSS Feed
Ronein
Onyx | Level 15

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;
 
2 REPLIES 2
Quentin
Super User

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 ;
Tom
Super User Tom
Super User

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.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 964 views
  • 2 likes
  • 3 in conversation