This macro analyzes the provided library (or table) name. It excludes standard libraries (WORK, SASHELP, SASUSER). For other libraries, it queries the SASHELP.VLIBNAM view to extract the physical path and stores it in a specified macro variable. Note: The code seems to contain a variable inconsistency (&thedsn vs &lib) and potential syntax errors (%upcase(lib) instead of &lib).
Data Analysis
Type : SASHELP
Uses the SASHELP.VLIBNAM system view to read library metadata.
1 Code Block
DATA STEP
Explanation : Macro definition. Conditional logic to determine the target libref. If it's not a default library, a DATA STEP _NULL_ is executed to read SASHELP.VLIBNAM and assign the path to the target macro variable via CALL SYMPUT.
SET sashelp.vlibnam(where=(upcase("&lib")=LIBNAME));
12
call symput("&into",path);
13
RUN;
14
%END;
15
16
%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.