BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi,
I have written all my codes in EG .
Now im trying to run a sas code by scheduling it every 15 mins...

First i save my code as D:\Final\Codet4sch.sas on server
Then i create a batch file havin the following command:

Start/w C:\SAS\SAS.exe –sysin D:\Final\Codet4sch.sas

Wen I double click this Batch file or put it in windows scheduler..it should run Codet4sch.sas automatically..

But here it throws an exception tht it could not locate sas.exe.... how do i create one>>??

Thanks,
Nachiket
2 REPLIES 2
deleted_user
Not applicable
The issue can be found by reading the error message. SAS.EXE is not held in C:\SAS\Sas.exe and hasn't been installed in that location since version 6.

It is in a directory under Programs, in an area identified as SAS Institute in a folder that specifies the version of SAS. Search for it in Windows explorer and adjust the path. Note that since the path will include spaces that you will need to enclose the command line for SAS in double quotes or it won't work.

Kind regards

David
deleted_user
Not applicable
David,

It runs w/o error now but wat it does is it pops up a new cmd window labelled with the path where i ve stored my .sas file...

but it doesnt execute the code i guess coz i cudnt find a dataset in the desired location after execution of code...as per my expectations...

Is der any alternate method to do scheduling using Windows Scheduler?

Thanks,
Nachiket

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1148 views
  • 0 likes
  • 1 in conversation