Architecting, installing and maintaining your SAS environment

sasenv_local question

Accepted Solution Solved
Reply
Super Contributor
Super Contributor
Posts: 328
Accepted Solution

sasenv_local question

we are using sas9.4 on linux with grid environment.

Does sasenv_local setting applys to all sas jobs? (batch mode/ interactive fashion/ grid run)? when we have environment variable set up here do we still need to apply it to /etc/profile file for all?

Thank you -


Accepted Solutions
Solution
3 weeks ago
Super User
Posts: 6,963

Re: sasenv_local question

Everything that starts a new SAS session uses the {SASHOME}/SASFoundation/9.4/sas script. That is actually not a script itself, but a link to one of the scripts in the {SASHOME}/SASFoundation/9.4/bin directory (sas_{language}, sas_dbcs, sas_u8). These scripts themselves source (include) the sasenv and sasenv_local files located in the same directory.

So you can safely assume that a variable you set in sasenv_local will be set for every SAS session on that server.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers

View solution in original post


All Replies
Frequent Contributor
Posts: 92

Re: sasenv_local question

Yes, sasenv_local applies to all SAS sessions on that server, regardless where they were called from.

 

Regarding your second question....It depends. What is the particular setting in question ?

Super Contributor
Super Contributor
Posts: 328

Re: sasenv_local question

thanks nhvdwalt.

 

lets say if i have oracle related environment variables set up there in sasenv_local, should i set up at /etc/profile as well?

 

SAS Employee
Posts: 120

Re: sasenv_local question

@woo,

 

>> should i set up at /etc/profile as well?

 

No, it's not necessary.

Frequent Contributor
Posts: 92

Re: sasenv_local question

You will place you Oracle variables in sasenv_local. If you have users that will use the Oracle utilities OUTSIDE of SAS, then yes, those values will need to be in their .profile scripts as well. It's unlikely since your users will probably want to connect to Oracle from SAS, but possible.

Contributor
Posts: 73

Re: sasenv_local question

Hi @woo

sasenv_local is one of the configuration files which is read by the SASFoundation Process that is going to be launched on the server and it would be for all - Batch/Inter/Grid/Manual Submissions.

If you wish to use the variable to be used for all the users using the GRID, then it's enough to use it in sasenv_local file. But if you wish to restrict it to few users only, then you can use the /etc/profile.

Hope this helps.

Thanks,
AV
Solution
3 weeks ago
Super User
Posts: 6,963

Re: sasenv_local question

Everything that starts a new SAS session uses the {SASHOME}/SASFoundation/9.4/sas script. That is actually not a script itself, but a link to one of the scripts in the {SASHOME}/SASFoundation/9.4/bin directory (sas_{language}, sas_dbcs, sas_u8). These scripts themselves source (include) the sasenv and sasenv_local files located in the same directory.

So you can safely assume that a variable you set in sasenv_local will be set for every SAS session on that server.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Super Contributor
Super Contributor
Posts: 328

Re: sasenv_local question

Thank you so much all for your commnet,

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 7 replies
  • 321 views
  • 3 likes
  • 5 in conversation