| Search: |
How to Use Linux SAS from Mac OS X
If you have questions about accessing the Linux SAS server, please e-mail kathy@iastate.edu or stop by the Statistical Computing Section in Snedecor 117.
The following information applies only to Mac OS X 10.3 (Panther) and
Mac OS X 10.4 (Tiger).
Although this information may also work on Mac OS X 10.2 (Jaguar) too,
no testing has been done to verify this.
Table of Contents Availability of SAS
The Linux SAS Server
Running Linux SAS in Full Screen Mode
Running Linux SAS in Batch Mode
As of January, 2005, Linux SAS has replaced our previous version of
Vincent SAS. Linux SAS can be accessed in 2 modes: full screen or
batch mode.
|
Linux SAS can be displayed in full screen mode by using the Mac OS X X11 client. If you did not install X11 as part of installing Mac OS X, you need to install it before using Linux SAS in full screen mode. To install X11:
The Mac OS X X11 application defaults to displaying all X11 windows on your desktop along with your other Mac OS X application windows. If you wish to display your X11 windows in a separate "screen", choose X11->Preferences and under "Output" check the "Full screen mode" checkbox. Then use the Command-Option-A keystroke to enter and leave X11 full screen mode. To run Linux SAS in full screen mode on your Mac OS X system, first launch the X11 application (in /Applications/Utilities). When the "xterm" window appears, execute this command to connect to the Linux SAS Server:
Note that -X must be specified to enable X11 forwarding over SSH (i.e. SSH Tunneling). The first time you ssh to the Linux SAS Server, you will be asked if you want to continue:
Answer yes. You will not be asked this question again on subsequent ssh connections. You will then be asked to type in your Iowa State Net-Id password (assuming that you are logged into your Mac OS X system using the same login name as your Net-Id). If you are using a different Mac OS X login name, use this ssh command instead:
where 'net-id' is your Iowa State Net-Id. Then, after logging into the Linux SAS server, to run SAS, execute this command:
This will bring up the SAS windows. You can enter your program code in the Program Editor window and submit the code. Your errors/comments will appear in the Log Window and Results in the Output Window. To print results from the output window, click on File->Print and select your printer of choice. Note that the Durham and Snedecor printers are UBill printers. If you select to print to your "Default Vincent Printer" it will print to the printer defined in one of your startup files. To find out your default printer, type "env | grep PRINTER". To change your default printer, execute the following in the xterm command window:
|
To access the Linux SAS Server in batch mode, launch the Terminal application (in /Applications/Utilities). When the terminal window appears, execute this command to connect to the Linux SAS Server:
The first time you ssh to the Linux SAS Server, you will be asked if you want to continue:
Answer yes. You will not be asked this question again on subsequent ssh connections. You will then be asked to type in your Iowa State Net-Id password (assuming that you are logged into your Mac OS X system using the same login name as your Net-Id). If you are using a different login name, use this ssh command instead:
where 'net-id' is your Iowa State Net-Id. Using an editor (such as 'joe', 'emacs', or 'vi'), create your SAS program. For example,
Then enter the following command to run the program in batch mode:
This will create the following files that can be viewed with your editor or with a pager program (such as 'more' or 'less'):
If there are errors, use your editor to fix the myprogram.sas file and rerun the program. To print, use the "lpr" command to print your output:
where 'printer' is the printer you want to print to. Note that the
Durham and Snedecor printers are UBill printers.
|
Last updated August 31, 2009