Help using Base SAS procedures

Scheduling programs to execute one after another

Accepted Solution Solved
Reply
Contributor
Posts: 37
Accepted Solution

Scheduling programs to execute one after another

Hi,

Is there an option in SAS to schedule programs to run one after another? Please help, have about 30 programs to run but hate checking back whether one is finished before executing another and donot wanna do it through VBA.

-Akber


Accepted Solutions
Solution
‎11-23-2011 09:34 AM
New Contributor
Posts: 4

Re: Scheduling programs to execute one after another

Posted in reply to akberali67

SYSTASK command along with WAITFOR command can be used to run a list of SAS programs within a program.

For example, the following systask is used to run test.sas program.

systask command "sas.exe -sysin test.sas -nosplash -icon -log test.log" taskname=task1 status=stat1;


waitfor task1;

The WAITFOR command can be used to sequence the jobs if needed.

Hope this helps.

Selva.

View solution in original post


All Replies
Super User
Posts: 5,430

Scheduling programs to execute one after another

Posted in reply to akberali67

What does your SAS environment look like (licenses, servers...?).

The scheduling options available to you within SAS is described in the documentation.

If this does not work for you, you'll need to look at 3rd party resources, maybe there is a scheduler available at your site?

http://support.sas.com/documentation/cdl/en/scheduleug/64110/HTML/default/viewer.htm#titlepage.htm

/Linus

Data never sleeps
Super Contributor
Posts: 1,636

Re: Scheduling programs to execute one after another

Posted in reply to akberali67

you can put all you programs in one sas file using %include. then just run the sas file.

%include "c:\temp\code1.sas";

%include "c:\temp\code2.sas";

Solution
‎11-23-2011 09:34 AM
New Contributor
Posts: 4

Re: Scheduling programs to execute one after another

Posted in reply to akberali67

SYSTASK command along with WAITFOR command can be used to run a list of SAS programs within a program.

For example, the following systask is used to run test.sas program.

systask command "sas.exe -sysin test.sas -nosplash -icon -log test.log" taskname=task1 status=stat1;


waitfor task1;

The WAITFOR command can be used to sequence the jobs if needed.

Hope this helps.

Selva.

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 214 views
  • 8 likes
  • 4 in conversation