You can set the environment variables for SAS by defining them on the project level as shown below , and then accessing them in SAS using SYSGET -
Setting up project environment variables
You can configure your secure configuration to be injected at execution time via environment variables.
To set this up, go to the Settings tab on the project you wish to configure. Under the “Environment variables” section you can add key/value pairs which will be injected as env vars at execution time.
Getting environment variables in SAS