Subj : XBOOT3.BTM To : Jasen Betts From : Gerald Miller Date : Sun Nov 10 2002 09:49 pm Hello Jasen, On Saturday November 09 2002 at 12:21, Jasen Betts [3:640/531.42] wrote to Gerald Miller, about: XBOOT3.BTM JB> here's a solution to the date format problem. JB> what I do is set up a variable containing the conversion expression JB> that converts between date formats then just use that variable to JB> extract a converted form of the date when reading the file... theat JB> way the conversion only needs to be figured out once and can be reused JB> af often as needed. JB> text> %tempfile JB> PATH\PROGRAM TO RUN ³AFTER³ ³ ³DAYS ³ JB> ³ DAYS³LAST RUN³NEXT RUN³ LEFT³ASK JB> endtext I "shortened" the above display because of word wrap... JB> echo ÄÄÄÄ %@format[03.3,%country] %@repeat[Ä,32]Å%= JB> ÄÄÄÄÄÅ%df%Å%df%ÅÄÄÄÄÄÅÄÄÄ >> %tempfile JB> set orig=%@instr[48,8,%@line[%bootfile,2]] This is "looking good" - I've got to put it into practise and do some testing. Originally, I was making a comparison of the Country Code embedded on line 2 of the data file and the current Country Code of the system running the batch file ..AND. a comparison of your: set orig=%@instr[48,8,%@line[%bootfile,2]] and doing a "hard" date format conversion if there was inequality. I must incorporate your code into the _NEXT_ test batch.... :)) JB> iff %orig == %df then JB> set dateconversion=%%date JB> else JB> :: build a date conversion expression in a variable... JB> set dateconversion=%= JB> %%@instr[%@index[%orig,%@instr[0,2,%df]],2,%%date]%@instr[2,1,%df]%= JB> %%@instr[%@index[%orig,%@instr[3,2,%df]],2,%%date]%@instr[5,1,%df]%= JB> %%@instr[%@index[%orig,%@instr[6,2,%df]],2,%%date] JB> :: aren't interpreted languages fun! JB> echo. JB> echo Converting date format from %orig to %df using expression: JB> set dateconversion JB> echo. JB> endiff JB> unset orig df I can't wait to see what happens here when I put in two LIES into the data file.... I have a copy of that data file that I sent you where I had changed the country code / date format. I will swap that file with the current data file. JB> do n=3 to %@lines[%bootfile] JB> set prog=%@instr[0,41,%@line[%bootfile,%n]] JB> set when=%@instr[42,5,%@line[%bootfile,%n]] JB> :: convert last to local format JB> set date=%@instr[48,8,%@line[%bootfile,%n]] JB> set last=%dateconversion JB> :: next is never used but I'll convert it too :) JB> set date=%@instr[57,8,%@line[%bootfile,%n]] JB> set next=%dateconversion Next was a variable name that I assigned when I had presumed that certain information was being copied to the tempfile instead of being updated. Now that I know otherwise, I guess I can make some changes.... :)) JB> set left=%@instr[66,5,%@line[%bootfile,%n]] JB> set ask=%@instr[72,1,%@line[%bootfile,%n]] I'll have to get testing... Thanks. Cheers ... Gerald --- GoldED+/386 v1.1.5-21101 * Origin: Assembler Command: RRC; Rotate Random thru Carry. (1:342/512) .