next up previous
Next: Accessing Past History Text
Up: THE HISTORY COMPONENT
Previous: Enquiring about Past History Information

Accessing History by Date and Time  

In addition to the record number, the date and time form a convenient means of addressing history records which are, necessarily, stored in chronological order. To facilitate this, the NDF_HFIND routine provides a search facility which allows records to be identified by date and time:

      INTEGER YMDHM( 5 )
      LOGICAL EQ
      REAL SEC

      ...

      EQ = .FALSE.
      CALL NDF_HFIND( INDF, YMDHM, SEC, EQ, IREC, STATUS )

Given a date and time (with the years, months, days, hours and minutes fields stored in the YMDHM array and the seconds field held in SEC), this routine will return the number of the first record written after the specified date and time. A record number of zero is returned if no such record exists.

In this example, the EQ argument is set .FALSE., which instructs the routine not to report an exact date/time match. By setting it to .TRUE., an exact match would be permitted. This makes it possible to select records according to any constraint on the date and time of creation, using combinations of the following techniques:



next up previous
Next: Accessing Past History Text
Up: THE HISTORY COMPONENT
Previous: Enquiring about Past History Information


Starlink User Note 33
R.F. Warren-Smith
11th January 2000
E-mail:rfws@star.rl.ac.uk

Copyright © 2000 Council for the Central Laboratory of the Research Councils