06-13-2016 07:32 AM
I have a sas code and I need to atumate daily running this code as batch. My SASApp is installed on Linux Red hat 6.1.
please advise me about how to process this task.
Thanks in advanced
06-13-2016 08:55 AM
Depending on your installation and licenses you have several options. In order of advancedness (is that even a word?) SAS allows you to use:
Talk to your SAS represenative and/or examine SAS Management Console to see if anything is available. If not, cron may be your best bet.
06-13-2016 09:10 AM
Using SAS Management console, I have two scheduling servers:
- Operating system services
- SAS Distributed in-process services scheduling server
please advise me
Thanks for your reply
06-13-2016 04:21 PM
So you have all options I listed available to you.
Please read up on how scheduling is done in SAS. The docs are extensive but very clear. There is more to it than can be told in the scope of this post. But the gist is that you:
1) Deploy your code. In SASMC or, if available to you, in Data Integration Studio.
2) Create a flow and add your deployed job(s). One of the properties of the flow is the scheduling server (Platform, Operating System)
3) Schedule the flow: define when the flow must be started.
4) Sit back and enjoy the automated execution of your code.
But there can be a lot to it, especially if you use Platform. Its powers come with some complexity. The simpeler Operating System Services employs the at command for the planning. make sure that you are allowed to use this command. At out site it was initially not available to users.
06-13-2016 09:22 AM
Since your SAS runs on a real operating system, you can make use of the cron daemon through the crontab command.
Store your code as a .sas program file on RedHat, and then run it from the commandline with sas programname.sas
Once this is verified, add this commandline to your cron table.
I recommend keeping a text file that holds your crontab jobs; edit that when changes are needed and then simpy run crontab crontab_file