Hi, I am new to SAS programming. I just try to find optimization code for one my exercise. I have 3 SAS data set in my library. eg: data_1,data_2 and data_3. what i want do that i need count each data set rows and store in table. expected result: Table #Rows Data_1 40 Data_2 30 Data_3 230 i can simply do like this: Proc sql; create table ds.report as select 'Data_1' as Table, count(*) from ds.Data_1 union select 'Data_1' as Table, count(*) from ds.Data_2 union select 'Data_1' as Table, count(*) from ds.Data_3; quit; this solution basic school level and okay for small count of file. but i looking for simple code. eg: I can easily do this in qlikview. Report: Load Select tablename() as Table, count(*) from Data_*; Looking forward your advise for this case. Best, Robert
... View more