next up previous 237
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 237
Next: Accessing Past History Text
Up: THE HISTORY COMPONENT
Previous: Enquiring about Past History Information

NDF [1ex
Starlink User Note 33
R.F. Warren-Smith & D.S. Berry
5th January 2009
E-mail:ussc@star.rl.ac.uk

Copyright © 2010 Science and Technology Facilities Council