Hi there, How do i scan a particular library to use the latest table based on their name. In this example, library is toshare and tables all start with extdate_. I found this macro from another post which works when date format is yyyymmdd, but not for ddmmmyyyy. %macro getlasttable; %if not %symexist(date) %then %global date; %let date =; proc sql noprint; select max(scan(memname,-1,'_')) into :date from my_contents where libname = upcase("toshare") and memname like 'EXTDATE_%'; /* format date ddmmmyyyy.;*/ quit; %mend; Thanks for your help.
... View more