This program queries the `sashelp.vstabvw` system view to identify all tables or views whose name contains the string 'STAFF'. For each match, it uses `CALL EXECUTE` to invoke a macro named `%contents` (assumed to be defined elsewhere) on the identified table.
Data Analysis
Type : SASHELP
Metadata is read from the `sashelp.vstabvw` view.
1 Code Block
DATA STEP
Explanation : Reads table metadata, filters those containing 'STAFF' and dynamically generates the execution of the %contents macro for each table found.
Copied!
data _null_;
set sashelp.vstabvw(keep=libname memname);
where memname contains "STAFF";
call execute(cats('%contents(data=', libname, ".", memname, ')' ));
run;
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.