Help using Base SAS procedures

Code to show properties of librarys

Reply
N/A
Posts: 0

Code to show properties of librarys

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?
N/A
Posts: 0

Re: Code to show properties of librarys

proc datasets library=yourLIB details ; run;
N/A
Posts: 0

Re: Code to show properties of librarys

Is there a way to run this for multiple libraries or do I just have to do mutiple proc datasets statements?
N/A
Posts: 0

Re: Code to show properties of librarys

probably simpler to maintain as multiple lines.

If you have a lot of these, what will youwant to do with the output?
N/A
Posts: 0

Re: Code to show properties of librarys

keeping it as an HTML is fine. I am just trying to see if the data has been updated for the day
N/A
Posts: 0

Re: Code to show properties of librarys

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
Ask a Question
Discussion stats
  • 5 replies
  • 113 views
  • 0 likes
  • 1 in conversation