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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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