resolve Function
Monday, 17 September, 2012
⨳ 1 minute read ⨳ 78 words ⨳ function ⨳ sas ⨳Stumbled across a nice post on dynamic macro call using the RESOLVE()
function.
data rowcounts ;
length name $16
rows 8 ;
array aname(2, 2) $16 _temporary_
(
'sashelp.cars', 'Cars Rows'
, 'sashelp.class', 'Class Rows'
) ;
do _n_ = 1 to dim( aname ) ;
name = aname(_n_, 2) ;
rows = resolve( cats('%dsnobs( dsn =', aname(_n_, 1), ')' ) ) ;
output ;
end ;
run ;