Solved

How to run SAS from Unix bash shell script and then create a log file?

Posted on 2012-03-29
2
938 Views
Last Modified: 2012-08-14
Is this a proper way to run/execute a SAS program and then direct or create a SAS log??

mydir=/start/dir
plog=/start/log
filename=sasprog1.log
sas=/products/SAS/SASFoundation/9.2/sas

$sas <$mydir/sasprog1.sas> $plog/$filename     

Open in new window


Currently nothing happens when I execute/run my SAS program. No log file is created, but from the examples that I read before this should be working.

Any takers?
0
Comment
Question by:labradorchik
2 Comments
 
LVL 48

Accepted Solution

by:
Tintin earned 500 total points
ID: 37784937
$sas <$mydir/sasprog1.sas> $plog/$filename  

Open in new window


should be


$sas $mydir/sasprog1.sas >$plog/$filename  

Open in new window

0
 

Author Comment

by:labradorchik
ID: 37787350
Thank you very much for your help! I will try your way!!
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now