libname lib sqlsvr dsn=EIS schema=SYS user="username" password="password" READBUFF=1000;
proc sql /*outobs=1*/ noprint;
create table a as select modify_date, NAME into :cif separated by ' '
from Libname.TABLES where NAME LIKE "table_name%" order by modify_date desc;
proc sort; by modify_date;
quit;
data _null_;
set a end=last;
if last;
call symput('outy',compress(name));
run;
Macro variable "OUTY" will contain the name of the latest dataset.
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning and boost your career prospects.