BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
akberali67
Calcite | Level 5

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

1 ACCEPTED SOLUTION

Accepted Solutions
sknguru
Calcite | Level 5

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

3 REPLIES 3
LinusH
Tourmaline | Level 20

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
Linlin
Lapis Lazuli | Level 10

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";

sknguru
Calcite | Level 5

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.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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