I must have mis-understood the question First row is very easy (obs=1) Last row not much more fuss (firstobs= &maxobs) We can collect these data without going through the whole of the (potentially - very big data) proc SQL ; select nobs into :maxobs from dictionary.tables where libname='YOURLIB' and memname = 'YOUR_TABLE' ; select * from yourLib.your_table( obs=1 ) union all select * from yourLib.your_table( firstobs= &maxobs ) ; quit ; based on sashelp.class, the results viewer shows Name Sex Age Height Weight ___________________________________________ Alfred M 14 69 112.5 William M 15 66.5 112 of course this speedy solution depends on YOURLIB.YOUR_TABLE being a SAS dataset ok - did I misunderstand? peterC
... View more