BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
milts
Pyrite | Level 9

Hi,

 

I was checking my SAS Enterprise Guide which connects to our SASApp. When i run proc options and see the CONFIG option, I see multiple config files appended. I would like to inquire on the following:

 

- Are the config files executed sequentially?

- If a certain option was set on the first config file, and set again on the succeeding config file, will it overwrite the setting or ignore the setting on the succeeding file?

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
SASKiwi
PROC Star

The simple answer is no. If you examine the config folders in more detail you will see there is an implicit hierarchy going on.

 

For example: D:\SAS\Config\Lev2\SASApp2\WorkspaceServer\sasv9.cfg - this config is only applicable to Workspace server sessions for the SASApp2 SAS application server.

 

Compare that to this one: D:\SAS\Config\Lev2\SASApp2\sasv9.cfg - this config applies to all session types for SASApp2 so is higher in the hierarchy than the previous one.

 

D:\Program Files\SAS\SASFoundation\9.4\sasv9.cfg - this applies to ALL SAS sessions including SASApp2 plus any other SAS application servers.

 

Read the documentation for a more detailed explanation:

http://support.sas.com/documentation/cdl/en/bisag/68240/HTML/default/viewer.htm#p1n3ivrea2b8fgn1at5j...

View solution in original post

8 REPLIES 8
SASKiwi
PROC Star

The simple answer is no. If you examine the config folders in more detail you will see there is an implicit hierarchy going on.

 

For example: D:\SAS\Config\Lev2\SASApp2\WorkspaceServer\sasv9.cfg - this config is only applicable to Workspace server sessions for the SASApp2 SAS application server.

 

Compare that to this one: D:\SAS\Config\Lev2\SASApp2\sasv9.cfg - this config applies to all session types for SASApp2 so is higher in the hierarchy than the previous one.

 

D:\Program Files\SAS\SASFoundation\9.4\sasv9.cfg - this applies to ALL SAS sessions including SASApp2 plus any other SAS application servers.

 

Read the documentation for a more detailed explanation:

http://support.sas.com/documentation/cdl/en/bisag/68240/HTML/default/viewer.htm#p1n3ivrea2b8fgn1at5j...

milts
Pyrite | Level 9

Thanks to everyone for all the enlightening responses!

ronan
Lapis Lazuli | Level 10

SAS Technical Support in France has drafted some time ago a lengthy and detailed explanation about the sequence of config/autoexec files dependency calls involved in the SAS workspace session launching. Even though it's in French, I strongly advise to look at page 6, there is a tree-like hierarchy showing the dependence over time and folders which is more visual ('visuality' being, absolutely speaking, in the eyes of the beholder) than the bone dry tabular form :

 

See bottom of page 6 :

 

https://www.sas.com/offices/europe/france/services/support/articles/US2013_Q3_Environnement.pdf

 

The document is so useful it should have been to be translated to English for a broader audience imho.  

 

A few years ago,SAS Press used to announce an upcoming book about SAS & its environment (Autoexec, config, system options etc.) by the legendary SAS "Macro maven" Ron Fehd but this didn't show up to this day, unfortunately, although it's a topic of paramount importance for SAS techies.

 

Edit :  the expression "Autoexec du Workspace" literally reads "Autoexec of the Workspace"   , "démarré/démarrage" means "Started/Start" HTH

MauroR_
Calcite | Level 5

You might find the answers here:

 

Order of Precedence for Processing SAS Configuration Files

http://support.sas.com/documentation/cdl/en/hostunx/69602/HTML/default/viewer.htm#p13flc1vsrqwr8n1vu...

 

good luck

Kurt_Bremser
Super User

Your config files are located in a directory tree in your sasconf (or whatever you named it during the configuration step of the SAS installation) directory, usually starting at directory Lev1.

In Lev1, there is a file called level_env.sh, a shell script that sets important environment variables used in the shell scripts (higher on in the directory tree) that start servers; an extension file level_env_usermods.sh exists in which you can put customizations.

Your application server configuration is located in the SASApp subdirectory (if you didn't change the name during configuration).

There you find another shell script, appservercontext_env.sh, which references the level_env.sh mentioned earlier; there's also a _usermods for that.

You also find a appserver_autoexec.sas and sasv9.cfg, which contain the basic common configuration for SASApp.

Now lets switch to one of the server configuration directories, ie WorkspaceServer. There you find the shell script that is referenced in your Workspace Server definition in the metadata (Management Console).

That shell script first sources the appservercontext_env.sh, which in itself sources level_env.sh. Environment variables are created in the sequence level_env - appservercontext_env - WorkspaceServer.sh; all those reference _usermods files, and the last setting for a particular environment variable will take precedence.

The shell script also builds a sequence of cfg files, starting at the SASApp directory, so that the local file will take precedence over those closer to root. Therefore configuration options are set in the sequence SASApp/sasv9.cfg - SASApp/sasv9_usermods.cfg - SASApp/WorkspaceServer/sasv9.cfg - SASApp/WorkspaceServer/sasv9_usermods.cfg. The final appearance of a setting takes precedence.

The same is done with the autoexec files, so that you get a sequence SASApp/appserver_autoexec.sas - SASApp/appserver_autoexec_usermods.sas - SASApp/WorkspaceServer/autoexec.sas - SASApp/WorkspaceServer/autoexec_usermods.sas.

Once again, the final setting takes precedence.

 

HTH

JuanS_OCS
Amethyst | Level 16

Hello @milts,

 

I think you have been nicely answered by @SASKiwi and @Kurt_Bremser and @MauroR_ (that's the exact link Mauro).

 

Let me summarize, hopefully it will help:

 

  1. Are the config files executed sequentially? In the end, yes, of course, this is sequencial programming. But please keep an eye on the right sequence. Gennerally: sasv9 (Foundation, root config) --> sasv9 (SASApp) --> sasv9_usermods (SASApp) --> sasv9 (Workspace) --> sasv9_usermods (Workspace) --> your custom config options (options statement)
  2. If a certain option was set on the first config file, and set again on the succeeding config file, will it overwrite the setting or ignore the setting on the succeeding file? the sequence above gives a good idea of the overule rules. E.g. a MEMSIZE 8G on your Workspace Server will overwrite other MEMSIZE option on sasv9 (WKS) or on the SASApp level, or even on SAS Foundation level.

Hope it helps,

Kind regards,

Juan

ChrisHemedinger
Community Manager

And if you want to see how a particular option was set, use PROC OPTIONS with the VALUE option.  Example for MEMSIZE:

 

proc options option=memsize value  ; run;

    SAS (r) Proprietary Software Release 9.4  TS1M4

Option Value Information For SAS Option MEMSIZE
    Value: 2147483648
    Scope: SAS Session
    How option value set: Config File
    Config file name:
            C:\PROGRA~1\SASHome\SASFOU~1\9.4\nls\u8\sasv9.cfg
Learn from the Experts! Check out the huge catalog of free sessions in the Ask the Expert webinar series.

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

Get Started with SAS Information Catalog in SAS Viya

SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 8 replies
  • 5342 views
  • 20 likes
  • 8 in conversation