DATA Step, Macro, Functions and more

Starting a SAS Session without sourcing sasenv_local

Reply
New Contributor
Posts: 4

Starting a SAS Session without sourcing sasenv_local

Hi,

 

is it possible to start a sas session under Linux without sourcing the sasenv_local?

 

We use a Veritas Cluster Server with two Linux Systems. The SAS installation is on both systems, but some files which are needed for sasenv_local are just on one system.

 

#> /opt/sas/SASHome/SASFoundation/9.4/sas -nodms
/opt/sas/SASHome/SASFoundation/9.4/bin/sasenv_local: line 28: /usd/db97446a/home/db297446/sqllib/db2profile: No such file or directory

 

Is there a parameter to start the session without loading the sasenv file?

Otherwise is it possible to check the detailed version without starting the sas session?

 

Thank you for your help!

Super User
Posts: 10,592

Re: Starting a SAS Session without sourcing sasenv_local

Since sasenv_local is a classic sh/ksh/bash script, you can use a condition for the offending line, based on the output of hostname:

if [[ `hostname -s` == XXXXX ]]
then
  . /usd/db97446a/home/db297446/sqllib/db2profile
fi

where XXXXX is the hostname of the server where you have the files available.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
New Contributor
Posts: 4

Re: Starting a SAS Session without sourcing sasenv_local

Posted in reply to KurtBremser

The file isn't fix at one host. It's always on the active system mounted.

Surely I can check if the file is there, but then I have to edit the sasenv_local on 110 servers.

 

So if there is a possibility to start the session without sasenv, it would help me much.

Super User
Posts: 10,592

Re: Starting a SAS Session without sourcing sasenv_local

Compared to doing 110 SAS installations, implementing that change is a breeze.

And if you had a way to automatically deploy those 110 installations, you also have a way to selectively deploy the sasenv_local or run an awk on it.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
Ask a Question
Discussion stats
  • 3 replies
  • 84 views
  • 0 likes
  • 2 in conversation