BookmarkSubscribeRSS Feed
Flo_And
Fluorite | Level 6

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!

3 REPLIES 3
Kurt_Bremser
Super User

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.

Flo_And
Fluorite | Level 6

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.

Kurt_Bremser
Super User

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.

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 lock in 2025 pricing—just $495!

Register now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1720 views
  • 0 likes
  • 2 in conversation