| To: | s-news@utstat.toronto.edu |
|---|---|
| Subject: | Summary: batch jobs in PC? |
| From: | Ning Li <lin@cryptic.rch.unimelb.edu.au> |
| Date: | Tue, 27 Mar 2001 17:14:25 +1000 |
|
Dear lister, Please let me thank Arnold Dekkers for his invaluable help, thank Duncan Murdoch for his documentation in s-archive "Re: [S] RE: Batch Jobs in Windows 98" dated Sun, 16 Jan 2000, thank my supervisor John Carlin for working out a final solution together with me. There are times when a big job has to be split into small ones, probably due to memory or speed consideration. When these jobs do not require outside intervention during the running process, a way of implementing them is by use of the command BATCH. To automatically execute a series of batch jobs under Windows can be realized by using DOS .bat files. An Example: Run 2 jobs one after another automatically under Windows. Suppose Splus is installed in d:\Sp2000, and you want the output go to d:\mySwS (except when using -attach()- the results may go somewhere else). 1) Create a directory to store your source files and .bat file. Say this directory is d:\Sbatch. 2) Use a text editor to write down the S commands you want to perform in job 1, and save them as, say, d:\Sbatch\s1.src. Repeat this for job 2 and save the commands file as d:\Sbatch\s2.src. 3) Edit a bat file including lines as this: call "d:Sp2000\cmd\SPLUS.exe" S_PROJ="d:\mySwS" /BATCH d:\Sbatch\s1.src d:\Sbatch\s1.out d:\Sbatch\s1.err call "d:Sp2000\cmd\SPLUS.exe" S_PROJ="d:\mySwS" /BATCH d:\Sbatch\s2.src d:\Sbatch\s2.out d:\Sbatch\s2.err In each line SPLUS.exe with its full path stays before S_PROJ; the data directory goes between S_PROJ= and /BATCH; after that come in order the source file, the out file and the error file. The data directory need to contain _data and _prefs sub directories. The out file and the err file don't necessarily exist before your running the batch jobs. Save the above lines in a file with extension bat in the same directory as the source files. Say it is save as d:\Sbatch\s1s2.bat 4) Close all applications except Windows explore. Go to d:\Sbatch and double click s1s2.bat. This will execute s1.src in background firstly. Waiting until it finishes, DOS will then automatically invoke a session to do s2.src in background. If you direct the output to a network drive, you will be able to access the part results before the whole job completes. ------------------------------------------------------------------ Ning Li Research Assistant, CEBU Univ. of Melbourne |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | PRESS statistic in multiple regression, Fay Hughes |
|---|---|
| Next by Date: | Summary: how to generate the sequence, Ning Li |
| Previous by Thread: | PRESS statistic in multiple regression, Fay Hughes |
| Next by Thread: | Summary: how to generate the sequence, Ning Li |
| Indexes: | [Date] [Thread] [Top] [All Lists] |