SAS tips and tricks
Usability_tips
Advanced tips
Enable printing from SAS
- Select File > Print Setup. Push Next.
- Under Name write XPP. Leave description empty. Push next.
- In the Printer model selection list, leave as the default. Push next.
- Set the following options in the next window and push next.
Device Type: Pipe
Destination: /apps/dcc/bin/xpp
Host options: <blank>
- Finished.
When you print from any window, a dialog box will show where you can select
the printer of your choice.
Remote access
Thinlinc can let you access SAS (and other things) over the internet, so you
don’t have to install several GB SAS-program etc. Convenient, unless you use the
programs very much. See G-bar wiki
on how to use Thinlinc.
Allow linebreaks in Program Editor
To have line-breaks in the SAS-editor you first mark the editor, open the
Toolbox and write in the white space:
autosplit
To make this permanent write in the Toolbox:
wsave
Avoid clearing Program Editor on Submit
- Select the Program Editor window
- Goto Tools > Options
- Select the Editing tab
- Remove check mark from Clear text on submit
- Push OK
Save window positions
To save the position of the windows:
put them where you want them
mark them one at a time and write "wsave" in the toolbox for each one
Shortcut keys
Push F2 to see a list of shortcut keys and have the possibility of
customizing them. (or, write keys in the toolbox)
Running SAS as a background job
The following assumes you are in your home directory.
- Use your favorite editor (must be able to save as ASCII).
- Enter the following 4 SAS-program lines:
* Hurra!! My first SAS-programme; * comment;
* empty line;
proc print data=stat2.sundhed; * print data;
run;
- Save the file as eg. myown.sas (NB: as ASCII, or plain text)
- In a terminal window run the program by:
sas myown
- In the directory there should now exist 2 new files, a myown.log and a
myown.lst. You can examine the files by writing:
more myown.log
and
more myown.lst
or look at them in your favorite editor or whatever you prefer.
SAS via SSH
A command which lets you open graphical programs (SAS, Matlab) over ssh
(probably x11 must be installed)
ssh -Y -C s05xxxx@thinlink.gbar.dtu.dk
Then sas can be run by:
sas &
& means that sas runs as a background job and frees the terminal.