Hi all SAS Users,
Today I had a chance to read some codes from other published papers. And I stuck at the first line
The first line is
%let SafeMode=0;
They explain it like that but I did not understand, could you please explain it to me? I did a search from google but no document available for this code?
/* Changing Safemode parameter to 1 would add few additional filters. (default=0)
It is inactive in the default settings. It might be useful for first look at new datasets */
%let SafeMode=0;
I know %let is used to assign a value for one variable, but do not know more than that for this code.
Warmest regards,
The program assigns a value of 0 to macro variable SafeMode.
What effect this has should be determined from the comment provided, and from how the macro is used.
It is a user-created variable and how it's used is entirely up to the person who used it.
The program assigns a value of 0 to macro variable SafeMode.
What effect this has should be determined from the comment provided, and from how the macro is used.
It is a user-created variable and how it's used is entirely up to the person who used it.
If you have the entire code of the macro I will bet that you find at least one instance of
%if &safemode=1 %then <other code>
or
%if &safemode=0 %then <other code>
if not both. What comes after the IF is what the macro variable is controlling.
Hi @ballardw
You are right! There are some lines of code exactly what you mentioned
%if &safemode=1 %then <other code>
Warm regards.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.