Architecting, installing and maintaining your SAS environment

Scheduling sas code as batch in Red hat Linux 6.1

Reply
Contributor
Posts: 43

Scheduling sas code as batch in Red hat Linux 6.1

Dear Colleagues,

 

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

Super Contributor
Posts: 440

Re: Scheduling sas code as batch in Red hat Linux 6.1

Posted in reply to husseinmazaar

Hi @husseinmazaar,

 

Depending on your installation and licenses you have several options. In order of advancedness (is that even a word?) SAS allows you to use:

 

  • IBM's LSF and Process Manager (a.k.a. Platform PLSF)
  • The Operating System Services server
  • Cron or at command.

 

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.

 

Regards,

- Jan.

Contributor
Posts: 43

Re: Scheduling sas code as batch in Red hat Linux 6.1

Posted in reply to jklaverstijn

Hi @jklaverstijn,

 

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

 

Contributor
Posts: 43

Re: Scheduling sas code as batch in Red hat Linux 6.1

Posted in reply to husseinmazaar
Also I have these scheduling servers:
- Oozie and Platform
Super Contributor
Posts: 440

Re: Scheduling sas code as batch in Red hat Linux 6.1

Posted in reply to husseinmazaar

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.

 

Good luck,

- Jan.

Super User
Posts: 7,785

Re: Scheduling sas code as batch in Red hat Linux 6.1

Posted in reply to husseinmazaar

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

 

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Ask a Question
Discussion stats
  • 5 replies
  • 418 views
  • 0 likes
  • 3 in conversation