Do you mean execute SAS in batch mode or execute a .BAT file???
I'll answer what I do for the 2nd possibility. When I execute a .BAT or .CMD file on Windows. For example, I have a .BAT file (MYCOPYLIST.BAT) that copies a list of files from one folder to a backup folder. I submit code like this in a SAS program:
options noxwait noxsync;
To find out how to execute SAS in batch mode, you have to consult the SAS Companion for your operating system.
Thats exactly what I do with my batch file. I have a prod.bat on windows. I do not want to click it manually. Rather I would like to code a sas program and schedule it so that it can take care of executing the batch file (runprod.bat). Will this code of yours work for me?
You can use the Windows Task Scheduler to schedule batch files. For more information, use Google to search for "windows schedule batch file" (without the quotes) or click Start->Help and Support and then enter Task Scheduler in the search box.