|
|
|
||||
|
|
|||||
This page shows how you can customize your version of SAS 9.2 for Windows.
Sometimes, the default location for SAS temporary WORK directory may not be large enough. You can change the location for WORK directory before you start up SAS.
The easiest way to do it may be to modify the parameters for sas.exe. Here is how to do it.
Step 1. Right click on the icon of SAS and choose Properties. This will bring up a window called SAS Properties shown below.

Step 2. Choose the Shortcut Menu.
The Target field tells us where the sas.exe is located and what parameters it takes. In this example, it looks like:
"C:\Program Files\SAS9_2\SASFoundation\9.2\sas.exe" -CONFIG "C:\Program Files\SAS9_2\SASFoundation\9.2\nls\en\SASV9.CFG"
This tells us that the executable sas.exe is located in the folder C:\Program Files\SAS9_2\SASFoundation\9.2 and it uses the default configuration file SASV9.CFG located in the folder C:\Program Files\SAS9_2\SASFoundation\9.2\nls\en\.
Step 3. Let's say that we want to change the WORK directory to D:\temp. In the Target field, we can add "-work "D:\temp" at the end. Then the target line becomes
"C:\Program Files\SAS9_2\SASFoundation\9.2\sas.exe" -CONFIG "C:\Program Files\SAS9_2\SASFoundation\9.2\nls\en\SASV9.CFG" -work "D:\temp"
Click on the OK button.
That's all to it. Now after you fire up SAS,
you can double check if the WORK directory has been set up to the location you
want. For example, you can do:
proc options option=work; run;
1 proc options option=work;
2 run;
SAS (r) Proprietary Software Release 9.2 TS1M0
WORK=d:\temp\_TD4532
Location for WORK SAS data library
You may notice that SAS has actually created a subfolder in the directory that we have specified. This is because SAS allows multiple sessions (that is to say that you can fire up SAS multiple times) and each session will require its own temporary work space. SAS will create a unique temporary WORK directory for each of the multiple sessions in D:\temp.
Very often, you have a libname statement at the beginning of your SAS program file to specify the location of your SAS data files. You can set up a permanent library associated with the location so every time when SAS starts, it will make the data files in the location available to you. For example, I have stored many SAS data files in the folder called d:\work\data\sas on my machine and I want to set up a permanent library so the data files in the folder can be seen and used directly every time I use SAS. Here is what I can do.
You see all the default libraries that SAS has created.



SAS has sample programs for data steps and all the procedures. This is a huge resource for learning SAS at all levels. An easy way to access these program files is to create our own Favorite Folders for them. Here is an example for creating a folder that contains all the sample programs for SAS/STAT module.





Some people prefer to have line numbers along the program as shown below.

This can be done as follows.
Notice that the Enhanced Editor Window (usually it is the Editor Window) has
to be in focus in order to see the its options in the following steps.
Tools
Options
Enhanced Editor Options Choose
Show line numbers

After starting SAS, click on the Editor Window so it is on focus. You can customize almost every aspect of the Editor Window, such as the color and font for comments, etc. You can save your choice as a customized scheme.
Tools
Options
Enhanced Editor Options
Appearance

Sometimes, it may be desirable to create a webpage directly from the output from a procedure. For example, we have run a regression analysis and have also requested a plot as shown below. How do we put the output of the regression analysis and the plot together in one webpage?
proc reg data = hsb2; model write = math female; plot pred.*math = female; run; quit;
This can be down easily by allowing SAS to create an HTML page automatically. You may want to consider to turn the option on ONLY when you want to create a webpage based on the output.
Tools
Options
Preferences and then the
Results tab
Check Create HTML. You
can view the results in the SAS internal browser (by default). If you
wish, you can choose Preferred web browser
and it will fire up a new web browser each time you submit a program and
generate results.

Here is the link to the page that SAS created based on the output from the code above.
There are many pre-defined keys in SAS to be used other than via
point-and-click fashion. Most common one may be F3 key to run a SAS
program in a Program Window that is on focus. The commonly used keys are:
| Key | Definition |
| F1 | SAS System Help |
| F3 | Submit |
| F5 | Editor Window |
| F6 | Log Window |
| F7 | Output Window |
| F8 | Zoom off; submit |
| F9 | Show definition of keys |
For example, by hitting F9 key, you will see a window like the one below:

UCLA Researchers are invited to our Statistical Consulting Services
We recommend others to our list of Other Resources for Statistical Computing Help
These pages are Copyrighted (c) by UCLA Academic Technology Services