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.
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.
Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning and boost your career prospects.