www.sas.com > SAS UK > In the Know Homepage Search | Contact Us    
SAS UK Newsletter Banner SAS - The power to know(tm)  

In SAS®9, Saying "less" on the Command Line Provides Even "more"

(Written by Peter Crawford, Crawford Software Consultancy Limited)

Among the features new in SAS®9 on windows, comes a convenient facility for starting SAS in a mixed or multi-use environment.

By "mixed" I mean the environment where different types of SAS sessions might be started. Such as a batch submit of a .sas file, as well as interactive pre-packaged solutions using SAS or SAS Display Manager sessions.

By "multi-use" I anticipate situations where more than one user uses the same configuration file to start SAS.

For example I may want different options when a SAS program is run in batch or to be included into a SAS display manager session. Running SAS programs in "Production" usually requires many different options and paths, than running SAS in a "Development" environment.

Many options can be changed within a SAS session, but others can only be set when SAS starts. This new feature in SAS®9 helps with these "invocation" options.

To demonstrate this new feature no configuration file should be defined at SAS start-up.

In SAS® 8, it would then take the first configuration file it found from various places documented in online doc at: http://v8doc.sas.com/sashtml/win/z0104286.htm#zchrules.

In SAS®9, it will look in the following three places to find its configuration file. Unlike SAS® 8, SAS®9 will use any or all SASv9.cfg files it finds.
  1. !SASROOT (e.g. C:\Program Files\SAS\SAS 9.1)
  2. <users-window-profile>\My Documents (e.g. C:\Documents and Settings\Peter Crawford\My Documents)
  3. <Current Folder> (e.g. C:\project)
This would allow a separation of the definition of the environment described by the configuration as follows.
  1. In !SASROOT\SASv9.cfg, place installation specific options.
  2. In <users-window-profile>\My Documents\SASv9.cfg, place user specific options.
  3. In *each* <current folder>\SASv9.cfg, place project specific options.
There are many options that take advantage of this kind of separation. Here is an example that demonstrates the effect of having three separate SASv9.cfg files. To see which configuration files have been used by SAS place the option -VERBOSE in any of the configuration files.

The table shows what happens when the value for the option -AWSTITLE "Title text for AWS title bar" is set to something different in the three types of configuration files mentioned above.

!SASROOT My Documents Current Folder Result Comment
SAS Site Defaults     SAS Site Defaults New user Options
SAS Site Defaults SAS for Peter   SAS for Peter User Options
SAS Site Defaults SAS for Peter SAS Project SAS Project Project Options