| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | long BTM file |
ML>> ===== sched.dif =====
ML>> Comparing files SCHED.ORG and sched.btm
ML>> ****** SCHED.ORG
ML>> :! SCHED.BTM VERSION 1.0 dec-2003
ML>> :!
ML>> ****** sched.btm
ML>> {at}echo off
ML>> :! SCHED.BTM VERSION 1.0 dec-2003
ML>> :!
ML>> ******
GM> Hmmmm. Take a look in your 4DOS.INI file... You can insert
GM> the following directive (makes the need for "{at}echo off" in
GM> batch files totally unnecessary):
yes but i mostly write BAT files not BTM files... i prefer to keep it in
there out of habit and for those times that i'm running in barefoot dos
GM> [snip]
ML>> ===== end =====
GM> Sorry for snipping your code Mark... (My editor wrapped
GM> everything so badly that it was not very pretty to look at.)
that's ok... in a reply, that is to be expected... in what i sent, there
were only one or two lines that wrapped...
ML>> i hope its not too far off from what else may have already been
ML>> altered... the spacing on the logfile entries is critical... here's a
ML>> sample of what it looks like...
ML>> ---------- Fri 5 Dec 03, SCHED Process
ML>> 01:06:09 SCHED: Executing STEP_0.BTM...
ML>> 01:06:09 SCHED: Executing STEP_1.BTM...
ML>> 01:06:09 SCHED: Executing STEP_3.BTM...
ML>> 01:06:09 SCHED: Executing BIRTHDAY.BTM /MARK...
ML>> 01:06:11 SCHED: Executing MIDNIGHT.BTM...
ML>> ---------- Wed 10 Dec 03, SCHED Process
ML>> 08:24:12 SCHED: Executing STEP_0.BTM...
ML>> 08:24:12 SCHED: Executing STEP_1.BTM...
ML>> 08:24:12 SCHED: Executing MIDNIGHT.BTM...
ML>> ---------- Thu 11 Dec 03, SCHED Process
ML>> 13:07:44 SCHED: Executing STEP_0.BTM...
ML>> 13:07:45 SCHED: Executing STEP_1.BTM...
ML>> 13:07:45 SCHED: Executing STEP_2.BTM...
ML>> 13:07:45 SCHED: Executing MIDNIGHT.BTM...
ML>> ---------- Thu 11 Dec 03, SCHED Process
ML>> ! 13:34:07 SCHED: Nothing to do because it's all been done!
ML>> there should possibly be a log entry for the A rule and how it was
ML>> answered for the program being asked about running... i haven't dug
ML>> that far into it, though... still trying to figure out some of the
ML>> syntax...
GM> That's pretty good. I got similar results in my log.
GM> Now, a challenge for you... Put it in the form of a RULE and
GM> modify the batch accordingly.
put what in a rule? the logging? that's quite ok... i prefer to have all
runs logged... my bbs, mailer, mail handler, file handler, etc all log
everything >
GM> Or, (this will probably be easier to do) use some IFF ... ELSE
GM> ... ENDIFF statements for your logging with #something# such as:<<
GM> :: logging addition by mfl
GM> :: Next command establishes the location of the variable
GM> "LOGFILE"
GM> :: (btm_name.LOG) [should be in the same directory as this
GM> BTM file...]
GM> :: LOGGING=N means that logging is off
GM> :: LOGGING=Y means that logging is on
GM> set logging=Y
GM> set logfile=%{at}path[%{at}search[%0]]%{at}upper[%{at}name[%0]].LOG
GM> set dd= JanFebMarAprMayJunJulAugSepOctNovDec
GM> set dy=%_dow %_day %{at}substr[%dd%,%{at}eval[%_month * 3],3]%=
GM> %{at}substr[%_year,2,2]
GM> and every place where you have logging statements, it could be
GM> in the form:
GM> :: logging addition by mfl
GM> :: start logging...
GM> iff "logging" eq "Y" then
GM> echo. >> %logfile
GM> echo ---------- %dy, %{at}UPPER[%{at}FILENAME[%0]] Process >>
GM> %logfile
GM> else
GM> endiff
that's true... it could be done like that using one of those option
settings i guess...
GM> (BTW, you really don't need the trailing "%" at the end of
GM> your %logfile variable...)
true again... habit from older 4DOS/4OS2/4NT stuffs... i do try to write my
stuff to run in both DOS vdms and os/2 native tasks...
GM> My reasoning for this suggestion is that once the batch file
GM> is fully debugged and functional, you are likely not going
GM> to need or require your log file any further.
nah... it is a record of what was done when... i have log files going all
the way back to 1985 or so OB-)
GM> When you reach that point, it's just a simple matter to
GM> change "set logging=y" to "set logging=n" and you won't
GM> have to go through the batch to comment out a bunch of
GM> code that you're not going to use. If, at a later point,
GM> you require the log file again, then you only have to
GM> change the "set logging" variable...
understand the thought but its not something that i will likely be doing...
GM> Also, in regards to the ASK query:
GM> I haven't received confirmation from Jasen, but in my batch, I
GM> looked for the following line:
GM> if not "%X" ne "Y" .and. "%X" ne
"{at}28" return
GM> commented it out and replaced it with the following:
GM> iff "%X" eq "Y" .or. "%X" eq
"{at}28" then
GM> set item=%{at}inc[%item]
GM> set run%item=%prog
GM> set last=%RUNDATE
GM> else
GM> set last=%last
GM> endiff
GM> return
GM> and this *_seems_* to be working for me. Please give it a try
GM> and report any problems here. I'm going to run with this
GM> until I hear otherwise.
i'll see what i can do... it may also be that it needs to UPPER the
keystroke so that Y and y are both checked for... i noticed that it did run
when i just hit enter...
i also notice that the Y is in yellow one character from the end of the
question whereas the cursor is right beside the end of the question... this
leaves me with two y's on the screen when i hit Y instead of enter...
cosmetic thing, ya know...
)\/(ark
* Origin: (1:3634/12)SEEN-BY: 633/267 270 @PATH: 3634/12 106/2000 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.