⨳ resolve function ⨳

September 17, 2012

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 ;

resolve function - September 17, 2012 -