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

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!

Register now

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
  • 484 views
  • 0 likes
  • 2 in conversation