Showing posts with label SAS on Unix. Show all posts
Showing posts with label SAS on Unix. Show all posts

Feb 2, 2011

Running SAS on Unix in Batch mode...

Alternative to Interactive SAS discussed @ http://sastechies.blogspot.com/2010/02/running-sas-on-unix-interactively-using.html one can use SAS in batch mode.
SAS in batch mode…
Create a .sas file and pasted the above code at your desired location on your unix box….if you are using PC then create the file and ftp it to your home drive (i.e. ~/)
The batch SAS command would be –
/opt/sas/sasb /pathtosasprog/prog.sas –log /pathtologfile/prog.log –print /pathtooutput/prog.lst
I have put the prog.sas in my home directory on the unix box which can be accessed by the path “~”
The command executed in the example below is -
/opt/sas/sasb ~/prog.sas -print ~/prog.lst -log ~/prog.log
SAS executes the sas program prog.sas located in my home directory (i.e. ~/) and sends any output to ~/prog.lst and the log to ~/prog.log.
Screes shot below shows the code in prog.sas located in my home directory…and then later the batch command I wanted to execute…
SAS on Unix Batch Mode
This screen shot shows the execution and the text getting printed to the terminal…
SAS on unix -- Batch Mode execution
This screen shot shows the log printed to the ~/prog.log file…
SAS on unix -- Batch Mode Output
The SAS example does not generate any SAS output…so ~/prog.st is not created for this instance.

Feb 12, 2010

Feb 2, 2010

Running SAS on Unix interactively using SAS Windowing Environment...

This tutorial assumes that SAS v 9.1.3 was installed on a Unix server at the location /opt/sas/ and the SAS interactive executable is /opt/sas/sasi on a Sun Solaris Unix server and Hummingbird Exceed software available on a PC.
sas on unix
In order to view the Interactive SAS Windowing environment on a Unix Box…One would require the X Windows display manager software like Humming Bird Exceed / Citrix Software or any similar software on his/her PC.
Run the command from the computer’s Start |Run
“C:\Program Files\Hummingbird\Connectivity\xxxx\Exceed\exceed.exe” -m query -w single -h UnixBox
where xxxx is the version of Exceed
SAS on Unix - Run Command
Enter your login credentials…You would require access to “UnixBox” server
SAS on Unix - Solaris Login
SAS on Unix -- Solaris Login
If you are doing this for the first time then choose either “Java desktop Environment or CDE Desktop” as your options.
This would open like a desktop environment…
SAS on unix - Desktop
Then go to Launch | Applications | Utilities |Terminal…to open a MS DOS prompt like Unix terminal…
SAS on Unix - Terminal
SAS on unix - Terminal
Then change directory to /opt/sas/ and then type “sasi” to invoke SAS..
Alternatively, you could type “/opt/sas/sasi” at the $ prompt..
SAS on Unix
The next screen shots show how SAS looks like on Unix Box and an example SAS Code that I have executed.
SAS on unix - Code
Look at the log for the output….
SAS on unix -- Output
You could run your SAS jobs in Batch mode…Read the article @ http://sastechies.blogspot.com/2010/02/running-sas-on-unix-in-batch-mode.html

Be Sociable, Share!