27 proc sql noprint; 28 create table tables as 29 select libname 30 , memname 31 , input(scan(memname,-1,'_'),?date11.) as date format=date9. 32 from dictionary.tables 33 where libname='SDLAB' 34 and memname like 'CUST^_%' escape '^' 35 ; NOTE: Table WORK.TABLES created, with 0 rows and 3 columns. 36 %put Found &sqlobs datasets in SDLAB whose names start with CUST_.; Found 0 datasets in SDLAB whose names start with CUST_. 37 select catx('.',libname,memname) into :dsname trimmed 38 from tables 39 having date = max(date) 40 ; NOTE: The query requires remerging summary statistics back with the original data. NOTE: No rows were selected. 41 %put The dataset with the largest date on the end of its name is &dsname..; The dataset with the largest date on the end of its name is CUST . 42 quit; NOTE: PROCEDURE SQL used (Total process time): real time 0.01 seconds cpu time 0.02 seconds
... View more