SAS - Automation

Hello all,

I need some guidance on SAS reports automation. How can I start the approching the automation of the reports. I have already written the code to create the reports
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Aloysius LowCommented:
what are you looking to use to automate the reports creation? is it by batch, triggered by some scheduling software?

if so, you could get the scheduler to trigger the sas code which will generate the report.
arukuAuthor Commented:
Yes, I am looking to use some scripts and cron job to do the automation where it should run everyday and the results should be mailed to the email
Aloysius LowCommented:
which part do you require assistance on in this case? the cron job portion, the shell script portion to execute the sas code, or the email portion?

is your sas code already producing a physical file which can be sent?
arukuAuthor Commented:
Yes, My sas code is producing a txt file but I need to do the scripting part where I need to include this code in the scripts and then trigger a cron job every day.
Aloysius LowCommented:
you'll need to write a shell script which looks like:
[path to sas executable]/sas -sysin [full path to sas code] -autoexec [full path to autoexec, if any] -log [full path to generate log into for the current execution]

-autoexec and -log options are totally optional. what's important is -sysin option which points to the file which should be executed by sas. this will be the sas code which you are talking about.

as for cron, you can refer to the following link:
however, you'll need knowledge of using vi for this purpose.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.