Hello Guys,
I have a dataset with a variable called "ENVIRONMENT", the values will in it would be either "UAT" or "PROD", but not both the values.
I want to store the value in a macro variable.
eg. if the dataset has a value of "UAT" stored today the macro variable should resolve to "UAT".
if the next extract of dataset tomorrow contains "PROD" i want the macro variable to resolve to "PROD"
Can anyone please help me out?
Something like
data _null_;
set have (obs=1);
call symputx('macrovar',environment);
run;
?
Something like
data _null_;
set have (obs=1);
call symputx('macrovar',environment);
run;
?
is there anything in your dataset which can trigger extraction or Data refresh is happening for UAT Or PROD environment?
If yes then we can change macro variables value dynamically o.w we need to pass macro parameters
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.