DEFSTRUCT GEN'JE'RECORD_STRUCT MAP2 source,b,1 ! 1- 1 MAP2 account,s,6 ! 2- 7 MAP2 amount,f,6 ! 8- 13 MAP2 period,b,3 ! 14- 16 MAP2 site,b,1 ! 17- 17 MAP2 date,b,3 ! 18- 20 MAP2 status,s,1 ! 21- 21 MAP2 doc,s,12 ! 22- 33 MAP2 filler,x,8 ! 34- 41 MAP2 record'status,s,1 ! 42- 42 ENDSTRUCT MAP1 gen'je'rec,GEN'JE'RECORD_STRUCT MAP1 file$,s,100 MAP1 num'recs,f,6 MAP1 recsiz,f,6 MAP1 blocks,f,6 MAP1 key'file,f,6 MAP1 a,f,8 MAP1 tv,f,8 MAP1 TEST'SOURCE,B,2 MAP1 START'DATE,f,6 MAP1 END'DATE,f,6 MAP1 SMALL'DATE,f,6 MAP1 BIG'DATE,f,6 MAIN'ROUTINE: START'DATE = 2460675 END'DATE = 2460675 FOR a = 1 TO 3 PRINT "--------------- TEST ";STR(a);" ---------------" CALL TEST'ONE NEXT a END TEST'ONE: num'recs = 8000016 recsiz = 42 file$ = "DSK02:GENJEH.DAT" XCALL TIMES, 3, tv ! Initial reset OPEN #1, file$, RANDOM, recsiz, key'file CALL check'time(msg$="Open file") SMALL'DATE=9999999999999 BIG'DATE=-9999999999 FOR key'file = 0 TO num'recs - 1 READ #1, gen'je'rec IF gen'je'rec.record'status<>"A" REPEAT ENDIF IF TEST'SOURCE<>0 AND gen'je'rec.source<>TEST'SOURCE REPEAT ENDIF IF gen'je'rec.dateBIG'DATE THEN BIG'DATE=gen'je'rec.date IF gen'je'rec.dateEND'DATE REPEAT ENDIF NEXT key'file CALL check'time(msg$="Iterate file") CLOSE #1 CALL check'time(msg$="Close file") RETURN PROCEDURE check'time(msg$ as s50:INPUTONLY) MAP1 t,f,8 XCALL TIMES, 3, t PRINT t/1000000 USING "###.######";" secs ";msg$ ENDPROCEDURE