% % set the low limit of date to retrieve % Time.Now dated !Raw.Base _Raw.Base _Raw.Days + minus "d" Time.Add !Raw.Least _Raw.Least shdate &"_" "rawseed" log)( !Raw.Seed "??????_*.txt" _Raw.Folder "AscendF" false "RawSum" File.DirOpen empty !builder _Raw.Days countdown { _Raw.Base exch - dup !cday minus "d" Time.Add "rawcb" log)( !Raw.Lcand _Raw.Lcand shdate dup !eday ofconn &".det" dup !dday exists "det" log)( { % % when the checking .det reaches today, % make sure the .det is newer than the last recorded raw entry % _cday zero dup { % % this is for today, compare most recent raw entry date % -1 "RawSum" File.DirFile any? { "mostrecent" log)( stamp _dday stamp "s" Time.Diff positive "diff" log)( { % % the .det is newer than the most recent data point % not } { % % the .det is older than the most recent data point % } ifelse } { % % no file in raw sum files % "None" log# } ifelse } if not { % % not today or today .det past time of most recent raw data % _dday read _Raw.Direction "down" eq$ { &:builder } { ^:builder } ifelse _eday &"_" "rawseedb" log)( !Raw.Seed _Raw.Lcand !Raw.Least } if } if } for % % process only files past the raw seed % _Raw.Seed "RawSum" File.DirAfter % % prior days date diff with least date, in days % 0 !bulday % % prior days value of Tcount first encountered % 0 !buldtcnt % % prior days most recently analyzed Tcount % 0 !pcount 0 !Telm.T9 0 !Telm.T10 0 !Telm.T11 0 !Telm.T12 % % initialize prior days date with least date % _Raw.Least !xdate % % prior days csv detail summary collector % empty !xubuld % % zero out the daily summary % *gwizsumz _Raw.Least !ldate