[Info-vax] check date against an given age
Hein RMS van den Heuvel
heinvandenheuvel at gmail.com
Fri Nov 13 13:56:15 EST 2009
On Nov 13, 10:16 am, DTL <didier.mora... at gmail.com> wrote:
:
> Now, considering the CPU time used with good old DCL and my Charon
> emulator :-) I've better code that in Fortran as the file is 220 000
> records big !
Unless you are more comfortable with Fortran than DCL, I'd say not
worth the hassle for a tiny 200k record file.You may want to pre-read
it with search to load teh XFC cache, such that the DCL single block
IO dos not slow it down.
The only CPU intensive code in my example is the silly FAO formatting
I added just for fun.
The core algorithm is only:
$ now = F$CVTIME(,,"DATE") - "-" - "-"
:
$loop:
$read...
:
$ yymmdd = 10000*(1900+F$ELEM(2,slash,jjmmaa)) + -
100*F$ELEM(1,slash,jjmmaa) + F$ELEM(0,slash,jjmmaa)
$ IF cutoff .GT. ('now' - 'yymmdd') / 10000
$ THEN. ...
:
Cheers,
Hein.
More information about the Info-vax
mailing list