;+
; NAME:
;     PRINT_DATE
; PURPOSE:
;     Reads all records within a range specified from a file, and prints
;     the date and time from the Time/Label field.  This is an example
;     routine to show how a simple task can be added to LAUNCHER's task list
; CATEGORY:
;     EXAMPLE
; CALLING SEQUENCE:
;     print_date,filename,srec,erec
; INPUTS:
;     filename   the name of the file
;     srec       the start record of the range
;     erec       the end record of the range
; OPTIONAL (KEYWORD) INPUT PARAMETERS:
; ROUTINES CALLED:
;     tl_decode
; OUTPUTS:
; COMMENTS:
; SIDE EFFECTS:
;     Dates/times are written to the terminal
; RESTRICTIONS:
; MODIFICATION HISTORY:
;     Written 26-Sep-1997 by Dale Gary
;-
pro print_date,filename,srec,erec

   ; Open the file

   openr,lun,/get_lun,filename

   ; Associate the file with variable A

   a = assoc(lun,intarr(1024))

   for i = srec, erec do begin
      tls = tl_decode(a(i))
      print,tls.yrday+tls.timstr
   endfor

return
end