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 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 5 replies
  • 1061 views
  • 0 likes
  • 1 in conversation