Yes, what you want to do is quite simple, but the technique is operating system dependent, as Cynthia pointed out. I don't think you are using VSE (heh!) so I am going to assume that you are running on Windows XP.
Just write your SAS code in a text file and save as foo.sas. Then run it one time from a windows command prompt. Start -> Run -> cmd.exe
> "C:\Program Files\sas\SAS 9.1\sas.exe" c:\projects\stuff\foo.sas
You can tweak this further by naming the sas log file and output with additional command line options. But this is the basic gist. And make sure that the SAS program is the first argument after the SAS executable. Options should follow. There are other incantations, but this way works.
Now go to the Windows control panel and schedule it. Double click on "Scheduled Tasks" then double click "Add a Scheduled Task" and follow the nifty dialogs. Select the sas.exe executable as the application that you want to schedule. When you get to the final dialog in the scheduler check the box that says "open advanced properties...". On the advanced dialog you can edit the "Run:" box to insert the path to your SAS file and any other parameters that you want. Remember to insert your SAS program just after sas.exe. There will probably be a -CONFIG option on the command line - just leave it.
Change the "Start in" folder to match the folder where your SAS program resides. This will get your SAS log to come out along side the program.
Finally, when you save the advanced dialog it will create a schedule task icon that just says "sas". You probably want to right click and rename the task to something more specific like "My Foo Program".
This works well, but you may get annoyed by the SAS splash screen that comes up when the program runs and you are logged on to the machine. Simply double click the scheduled task, edit the SAS command and tack on the -nosplash option to supress the splash screen.
Good luck,
John
... View more