BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Santt0sh
Lapis Lazuli | Level 10

Hi All,

 

I am trying to capture the Environment where the Current SAS program is executing.

for EX: if the SAS program is executing in Dev environment need to capture this in a macro variable.

%if  env = 10.09.126.4 %then do;

%let Env = Dev ;

%end;

%else %do;

%let env = Prod;

%end;

 

I want know if we have any Auto macro variables which displays the Environment the SAS code is running.

 

Thanks

 

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Santt0sh
Lapis Lazuli | Level 10

Hi Super user,

 

Thank you this works.....

View solution in original post

3 REPLIES 3

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1475 views
  • 2 likes
  • 3 in conversation