BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I am looking for a piece of code I can run that will show me the last time my datasets in my librarys were modified.

Is this possible?
5 REPLIES 5
deleted_user
Not applicable
proc datasets library=yourLIB details ; run;
deleted_user
Not applicable
Is there a way to run this for multiple libraries or do I just have to do mutiple proc datasets statements?
deleted_user
Not applicable
probably simpler to maintain as multiple lines.

If you have a lot of these, what will youwant to do with the output?
deleted_user
Not applicable
keeping it as an HTML is fine. I am just trying to see if the data has been updated for the day
deleted_user
Not applicable
you might prefer the selection from the environment reporting tables updated in the last, say, 3 days. That is a little different [pre]%let over = 3 ;
%let since= %sysfunc( intnx( days, "&sysdate9"d, -3 ), date9 ) ;
proc sql ;
create table recent_updates as
select * from dictionary.tables
where libname ne 'SASHELP' and libname ne 'WORK'
and moDate > "&since:0:0"dt
order by moDate descending ;
;
quit;[/pre]
For your environment, you may want to add other libraries from which you want no information, like SASHELP and WORK
That could have produced the report direct from sql, but I feel I have more control in proc print like the following [pre]
proc print data= recent_updates ;
id libname memname;
var nobs nvar modate ;
run;[/pre]

Without the moDate filter, you can report all datasets.


PeterC

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 5 replies
  • 768 views
  • 0 likes
  • 1 in conversation