While the BAT file was running, I added a couple of new lines of DOS
code to shoot an email out to a few people to let them kno wthe
process was starting.
When the BAT file finished running the stored procedure it was
processing, it started to RE-RUN the same stored procedure!
I was working on the assumption that a BAT file works like a SQL
stored procedure, in that you could edit it while you're running it
and it would just run whatever code was in the BAT file when it was
originally launched. Does anyone know if a BAT file checks for
updates in the middle of proceessing?
>When the BAT file finished running the stored procedure it was
>processing, it started to RE-RUN the same stored procedure!
>
>I was working on the assumption that a BAT file works like a SQL
>stored procedure, in that you could edit it while you're running it
>and it would just run whatever code was in the BAT file when it was
>originally launched. Does anyone know if a BAT file checks for
>updates in the middle of proceessing?
Some conventional wisdom of the old days said that a batch file was opened,
a line read and pointer saved, the batch file was closed and when that line
completed the batch file was reopened and the next line read.
If a running batch file was edited then unpredictable behaviour can occur.
The usual approach is *don't edit a running batch file*.
Maybe: Make a copy, run the copy, modify the original?
--
ArarghMail907 at [drop the 'http://www.' from ->] http://www.arargh.com
BCET Basic Compiler Page: http://www.arargh.com/basic/index.html
To reply by email, remove the extra stuff from the reply address.
foxidrive's so-called "approach" is more of a 'fundamental rule' of editing
batch files. The rule simply restated...
Never edit a running batch file. Unpredictable behavior can occur (and
usually does) when changes are made to a running batch file.
I use the copy, run the copy, approach myself on occasion.
--
Todd Vargo
(Post questions to group only. Remove "z" to email personal messages)