The script does not use external data or SAS tables for its processing. It focuses on querying and manipulating system parameters and internal SAS macro variables.
1 Code Block
PROC OPTIONS
Explanation : This block uses the `PROC OPTIONS` procedure to display the current value of the `SASAUTOS` system option. This option is crucial because it defines the directories in which SAS searches for autocall macros, thus influencing the availability of macro utilities in the session.
Copied!
proc options option=sasautos;
run;
1
PROC OPTIONS option=sasautos;
2
RUN;
2 Code Block
Macro
Explanation : These lines employ the `%sysget` macro function to retrieve and display the values associated with the `advtech` and `sasautos` environment or macro variables. `advtech` may contain information about advanced technologies or specific configurations, while `sasautos` confirms the paths to autocall macros.
Copied!
%put %sysget(advtech);
%put %sysget(sasautos);
1
%put %sysget(advtech);
2
%put %sysget(sasautos);
3 Code Block
Macro
Explanation : This block demonstrates the creation and manipulation of a macro variable. The `%trim` macro function removes leading and trailing spaces from a string, and `%left` left-aligns the result. The cleaned value is then assigned to the macro variable `a`, whose content is displayed to verify the result of the string manipulation.
Copied!
%let a = %left(%trim( aaaaaaaaaa));
%put |&a|;
1
%let a = %left(%trim( aaaaaaaaaa));
2
%put |&a|;
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.
Copyright Info : * E14_3_1.sas
* Checking system options after a config file modification.
« Mastering the interaction between the SAS macro facility and the underlying operating system is a core skill for any senior developer. This script demonstrates a two-pronged approach: validating the autocall search paths and ensuring data integrity through string normalization. »
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.