Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7082857
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:06:24+00:00 2026-05-28T07:06:24+00:00

I run some SAS queries monthly and they all take a fairly long time

  • 0

I run some SAS queries monthly and they all take a fairly long time to run. I was wondering if there was any way I can schedule these to run on a certain date each month in a certain order?

Thanks for your help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T07:06:24+00:00Added an answer on May 28, 2026 at 7:06 am

    On unix you could set the programs up to run in batch mode with a cron job.

    One trick you could use would be to set up a master SAS program to run everything.
    Make one program that just contains any global variables that need to be changed each month and then call your monthly programs with includes.
    something like:

    %let globalvar1 = ThisMonth;
    %let globalvar2 = LastMonth;
    
    %include '/path/to/sas/program1';
    %include '/path/to/sas/program2';
    

    Then you run only this one program in batch…it will run them in the correct order and automatically wait for them to finish executing before moving to the next program (setting up separate cron jobs would require you to overestimate how long each one takes so they wouldn’t conflict).

    This will dump everything into one log file…which may be good or bad.
    Another option would be to use X to call the program from the OS at each run.

    I am not 100% on the syntax but this should work if you use the right syntax for your OS (this could work on unix or windows so you would only have to schedule one program).

    At the end of each program just add:

    X "Path/to/sas.exe" -batch -noterminal nextProgram.sas
    

    This will let you chain the programs together so that they start the next one running after they finish. Then you just use task scheduler/cron to start “sas.exe -batch -noterminal firstProgram.sas”

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I run some sas queries on a monthly basis and they export data to
Is there any way to submit dynamically generated SQL to Teradata? I've written a
I've got the output of some simulations that look something like this: Run,ID,Time,Var1,Outcome 1,1,6,0.5,1
I am trying to run some javascript code that is created by my codebehind
I'm trying to run some unit-tests for NxBRE before I start referencing it's implementation
I want to run some basic checks when my ASP.NET server goes up. Mostly
i want to run some command on several machine using ssh. I know it
How can I automatically run some code when a WPF form is closed?
I need to run some classic ASP locally before deployment to a legacy web
I like to run some code when a user closes my ms 2000 app.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.