Subj : Revisions ... To : Jasen Betts From : Gerald Miller Date : Fri Oct 18 2002 11:29 pm Hello Jasen, On Thursday October 17 2002 at 18:09, Jasen Betts [3:640/531.42] wrote to Gerald Miller, about: Revisions ... JB> (this is a "style flame" feel free tyo ignore it) I choose not to ignore... GM>> === Cut Begin: XBOOT2.BTM === JB> the first potential problem I see with this BTM is that it uses JB> variables that start with underscores (_) variables that begin with JB> underscores are a bad idea when using 4dos as future versions of 4dos JB> may have them as internal variables. Valid point. Accepted. Revision: removed all underscores (_) from variable names EXCEPT 4dos internal variables, i.e. %_row, %_batchname. JB> I'll let you know what I find after I get it running without errors, JB> (so far I've found three errors that stop it from running here: JB> pipes in the data file, an %= escape in a ` quote, and the date JB> format) Ok now it's running. Oooops. Okay, I admit to the pipe character in exchange of the "³" character, but didn't know about not being permitted to use "%=" within a quote (trying to prevent wordwrap truncation) and require clarification about your error of the date format. GM>> and obtain the "NEXT RUN" value, which I had tried to do in the GM>> INCLUDE subroutine. I found that it wasn't quite as simple... JB> It is that simple. Just maybe.... Went to the ":INCLUDE" subroutine. Ammended to: === *** === :include set i=%@inc[%i] set run%i=%prog set nextdate=%@date[%@eval[%@date[%today] + %when]] return === *** === I then went to the line(s): === *** === iff "%ask" eq "N" .or. "%ask" eq "" then gosub include echo %@format[-41.41,%prog]³%@format[-10.10,%when]³%= %@makedate[%today]³%@makedate[%nextdate]³%ask >> %temp endiff elseiff "%prog" ne "" then echo %@format[-41.41,%prog]³%@format[-10.10,%when]³%last%= ³ ³%ask >> %temp endiff unset /q prog enddo === *** === I then ran the BTM. It looks promising.... JB> It maay be easier if you first but first you should split the echo JB> that writes to the data file off into a subroutine instead of having JB> it repeated 4 times. I'm sorry, I'm not understanding your intent. Would you explain in more detail and/or example? JB> and also remember to ensure that _next doesn't JB> come out blank when you read the data file, You can see that there is still a "blank" section in the BTM.... I had a dat file (TODAY - before BTM run): === *** === PATH\PROGRAM TO RUN ³AFTER DAYS³LAST RUN³NEXT RUN³ASK ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÅMM-DD-YYÅMM-DD-YYÅÄÄÄ call C:\4d\4x\STEP_0.BTM ³1 ³10-17-02³ ³N call C:\4d\4x\STEP_1.BTM ³1 ³10-17-02³ ³N call C:\4d\4x\STEP_2.BTM ³14 ³10-05-02³ ³N call C:\4d\4x\STEP_3.BTM ³28 ³10-05-02³ ³N call C:\4d\4x\STEP_4.BTM ³14 ³10-04-02³ ³N call C:\4d\4x\STEP_5.BTM ³1 ³10-17-02³ ³N call C:\4d\4x\STEP_6.BTM ³1 ³10-17-02³ ³N call C:\4d\4x\STEP_7.BTM ³1 ³10-17-02³ ³N === *** === Ran the BTM and got this: === *** === PATH\PROGRAM TO RUN ³AFTER DAYS³LAST RUN³NEXT RUN³ASK ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÅMM-DD-YYÅMM-DD-YYÅÄÄÄ call C:\4d\4x\STEP_0.BTM ³1 ³10-18-02³10-19-02³N call C:\4d\4x\STEP_1.BTM ³1 ³10-18-02³10-19-02³N call C:\4d\4x\STEP_2.BTM ³14 ³10-05-02³ ³N call C:\4d\4x\STEP_3.BTM ³28 ³10-05-02³ ³N call C:\4d\4x\STEP_4.BTM ³14 ³10-18-02³11-01-02³N call C:\4d\4x\STEP_5.BTM ³1 ³10-18-02³10-19-02³N call C:\4d\4x\STEP_6.BTM ³1 ³10-18-02³10-19-02³N call C:\4d\4x\STEP_7.BTM ³1 ³10-18-02³10-19-02³N === *** === I'll know better when it runs tomorrow. It's kinda late now, but I do hope there are no problems due the "non-pipe" characters.... Cheers ... Gerald --- GoldED+/386 v1.1.5-21011 * Origin: If there were no clouds we would not enjoy the sun. (1:342/512) .