BookmarkSubscribeRSS Feed
Ronein
Meteorite | Level 14

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 ;
The Boston Area SAS Users Group (BASUG) is hosting our in person SAS Blowout on Oct 18!
This full-day event in Cambridge, Mass features four presenters from SAS, presenting on a range of SAS 9 programming topics. Pre-registration by Oct 15 is required.
Full details and registration info at https://www.basug.org/events.
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.

SAS Innovate 2025: Call for Content

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!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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