TIP: Click on subject to list as thread! ANSI
echo: 4dos
to: Jasen Betts
from: mark lewis
date: 2003-12-11 14:03:32
subject: long BTM file

JB>> If you can't get diff to do it for you use fc.exe and I'll
 JB>> edit it in by hand.

 ml> ok, i'll see what i can come up with... so far, it seems to
 ml> work great ;-)

ok, here's the fc dif file... i didn't worry about trying to use %=
continuation lines and i'm sure that a few of these have wrapped...

===== sched.dif =====
Comparing files SCHED.ORG and sched.btm
****** SCHED.ORG
:! SCHED.BTM                             VERSION 1.0  dec-2003
:!
****** sched.btm
{at}echo off
:! SCHED.BTM                             VERSION 1.0  dec-2003
:!
******

****** SCHED.ORG

::  Next command establishes the location and name of the variable
****** sched.btm

:: logging addition by mfl
::  Next command establishes the location of the variable "LOGFILE"
::  (btm_name.LOG) [should be in the same directory as this BTM file...]
  set logfile=%{at}path[%{at}search[%0]]%{at}upper[%{at}name[%0]].LOG
  set dd=   JanFebMarAprMayJunJulAugSepOctNovDec
  set dy=%_dow %_day %{at}substr[%dd%,%{at}eval[%_month * 3],3] %{at}substr[%_year,2,2]

::  Next command establishes the location and name of the variable
******

****** SCHED.ORG

::  Is the file SCHED.DAT there?
****** sched.btm

:: logging addition by mfl
:: start logging...
    echo. >> %logfile%
    echo ----------  %dy, %{at}UPPER[%{at}FILENAME[%0]] Process >> %logfile%

::  Is the file SCHED.DAT there?
******

****** SCHED.ORG
   if [%1]==[DATAFILE] .or. [/DATAFILE]==[%1] .or. [%1]==[-DATAFILE] %=
    ( set tempfile=%bootfile %+ gosub tempfile %+ goto fin )

****** sched.btm
   if [%1]==[DATAFILE] .or. [/DATAFILE]==[%1] .or. [%1]==[-DATAFILE] %=
    (
      echo   %_TIME%  %{at}UPPER[%{at}NAME[%0]]: Creating new data file %bootfile
>> %logfile%
      set tempfile=%bootfile %+ gosub tempfile %+ goto fin
    )

******

****** SCHED.ORG

::  Set variables. If DAYBOOT1 did it's job today already or it's before
::  00:01 am, do nothing. In this case, the "start" time is 00:01 am....
****** sched.btm

::  Set variables. If SCHED did it's job today already or it's before
::  00:01 am, do nothing. In this case, the "start" time is 00:01 am....
******

****** SCHED.ORG
    echo.
    goto fin
****** sched.btm
    echo.
:: logging addition by mfl
    echo ! %_TIME%  %{at}UPPER[%{at}NAME[%0]]: Nothing to do because it's all
been done! >> %logfile%
    goto fin
******

****** SCHED.ORG

::  Read DAYBOOT1.DAT, look at which programs to run today, copy info to
::  UNIQUE.TMP and update DAYBOOT1.DAT
  set i=0
****** sched.btm

::  Read SCHED.DAT, look at which programs to run today, copy info to
::  UNIQUE.TMP and update SCHED.DAT
  set i=0
******

****** SCHED.ORG
        echo.
        call %[run%m]
****** sched.btm
        echo.
:: logging addition by mfl
        echo   %_TIME%  %{at}UPPER[%{at}NAME[%0]]: Executing %{at}UPPER[%[run%m]]...
>> %logfile%

        call %[run%m]
******

****** SCHED.ORG
      enddo
    endiff
****** sched.btm
      enddo
:: logging addition by mfl
    else
      echo ! %_TIME%  %{at}UPPER[%{at}NAME[%0]]: No items found to run in the
data file! >> %logfile%

    endiff
******

****** SCHED.ORG
    color bri cya on bla
    text
  ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
  ³ SCHED                   Once a day program execution with many options  ³
****** sched.btm
    color bri cya on bla
echos   Ú%{at}repeat[Ä,73]¿
echo.
    text
  ³ SCHED                   Once a day program execution with many options  ³
******
===== end =====


i hope its not too far off from what else may have already been altered...
the spacing on the logfile entries is critical... here's a sample of what
it looks like...


----------  Fri 5 Dec 03, SCHED Process
  01:06:09  SCHED: Executing STEP_0.BTM...
  01:06:09  SCHED: Executing STEP_1.BTM...
  01:06:09  SCHED: Executing STEP_3.BTM...
  01:06:09  SCHED: Executing BIRTHDAY.BTM /MARK...
  01:06:11  SCHED: Executing MIDNIGHT.BTM...

----------  Wed 10 Dec 03, SCHED Process
  08:24:12  SCHED: Executing STEP_0.BTM...
  08:24:12  SCHED: Executing STEP_1.BTM...
  08:24:12  SCHED: Executing MIDNIGHT.BTM...

----------  Thu 11 Dec 03, SCHED Process
  13:07:44  SCHED: Executing STEP_0.BTM...
  13:07:45  SCHED: Executing STEP_1.BTM...
  13:07:45  SCHED: Executing STEP_2.BTM...
  13:07:45  SCHED: Executing MIDNIGHT.BTM...

----------  Thu 11 Dec 03, SCHED Process
! 13:34:07  SCHED: Nothing to do because it's all been done!



there should possibly be a log entry for the A rule and how it was answered
for the program being asked about running... i haven't dug that far into
it, though... still trying to figure out some of the syntax...


)\/(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™.