BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Eitan123
Obsidian | Level 7

Hey,

I'm trying to find a way to define a global variable in DI (Data Integration). I have several environments, and I want each environment to have a different value for this variable (its going to be a string holding the name of the server of that environment. For many uses).

Anyone knows where can I define such a variable so that I only have to do it once per environment?
My SMC (SAS Management Console) is version 9.4_M7

Kind regards,
Eitan

1 ACCEPTED SOLUTION

Accepted Solutions
LinusH
Tourmaline | Level 20

If you need a SAS macro variable, an autoexec SAS file is appropriate. If it is to be used in the whole environment (DI, EG, batch), add your variable definition in the ../Levn/SASApp/autoexec_usermods.sas file.

 

If you prefer a system variable, you can set it in either a SAS config file, or a SAS shell/cmd file. They are also available under your configurations directories.

Data never sleeps

View solution in original post

1 REPLY 1
LinusH
Tourmaline | Level 20

If you need a SAS macro variable, an autoexec SAS file is appropriate. If it is to be used in the whole environment (DI, EG, batch), add your variable definition in the ../Levn/SASApp/autoexec_usermods.sas file.

 

If you prefer a system variable, you can set it in either a SAS config file, or a SAS shell/cmd file. They are also available under your configurations directories.

Data never sleeps

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

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 344 views
  • 0 likes
  • 2 in conversation