Professional Documents
Culture Documents
SAS UNIX:
1. Unix environment?
SAS can effectively be used with Unix operating system. We have some options that
would let the programmer to extract files from the terminal as well as save the Output to
the terminal.
3. What operating systems can you sit down at today and be productive?
I can be productive on Unix and Windows system.
5. Setting permissions?
A) r Read permission
w Write permission
x Execute permission
- no permission
Change permissions on file
Chmod [options] file
Chmod u + w file [gives the user (owner) write permission]
Chmod g + r file [gives the group read permission]
Chmod o x file [removes execute permission for others]
Cp oldfile newfile makes a duplicate (copy) of oldfile under the name newfile
Lpr filename Prints a file on the acs printer at the batch window,
111 Cummington St.
A nice feature of UNIX is that it provides programmers with the flexibility of scheduling their job
in the system, emailing the result and log file, and reporting the running status. The following
code can be a standard UNIX shell script for those functions.
#!/bin/ksh
export PATH="$PATH/opt/sas8"
# Initializing variables
date1=`date +%m/%d/%y`
# Remove Previous output files
# Starting code execution
echo 'Starting to run the sas Job' > sas_job.log
echo Start Date: $date1 >> sas_job.log
sas run.sas -noterminal
echo 'Finished running the sas Job' >> sas_job.log
date2=`date +%m/%d/%y`
echo End Date: $date2 >> sas_job.log
# Sending Log File via email
uuencode run.log run.log | mailx -s "LOG FILES" jhe@solucient.com
# Sending MS files via email
(uuencode stat.xls) | mailx -s "EXCEL FILES" jhe@solucient.com
exit 0