Data is read from the library specified by the macro parameter &fromlib. The code depends on user macros not provided here (AHGblank, AHGdsnInLib, AHGcount).
1 Code Block
DATA STEP Data
Explanation : Macro definition. It uses a %DO loop to iterate over the list of tables and dynamically generate DATA steps to perform copying and filtering.
Copied!
%macro AHGworkout(fromlib,dsns,tolib=work,pre=,where=%str(where 1));
%if %AHGblank(&dsns) %then %AHGdsnInLib(lib=&fromlib,list=dsns,lv=1);;
/* data &tolib..*/
%local i;
%do i=1 %to %AHGcount(&dsns);
data &tolib..&pre%scan(&dsns,&i);
set &fromlib..%scan(&dsns,&i);
&where ;
run;
%end;
%mend;
This material is provided "as is" by We Are Cas. There are no warranties, expressed or implied, as to merchantability or fitness for a particular purpose regarding the materials or code contained herein. We Are Cas is not responsible for errors in this material as it now exists or will exist, nor does We Are Cas provide technical support for it.
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. WeAreCAS is an independent community site and is not affiliated with SAS Institute Inc.
This site uses technical and analytical cookies to improve your experience.
Read more.