C
C $Header: /pita/work/HDF/dev/RCS/test/annotations/getSDSlablistF.f,v 1.1 90/06/26 16:39:39 mfolk beta $
C
C $Log:	getSDSlablistF.f,v $
c Revision 1.1  90/06/26  16:39:39  mfolk
c Initial revision
c 
C

      program getlablist

C Program to test getlablist routine
C
C Mike Folk  6/26/90
C
C****||************************************************************

      integer dallist
      integer i, nlabels, startpos
      integer reflist(20)
      integer DFTAG_SDG, LISTSIZE, MAXLEN
      character*20  filename
      character*15  labellist(20)
	
      parameter (DFTAG_SDG   = 700,
     *           LISTSIZE    =  20,
     *           MAXLEN      =  15)

C The test file being used is o2.  Substitute another if you like.
C This HDF file should contain some labels for SDSs.

      filename = 'o2'

      startpos = 1
      
      print *, 'Labels of scientific data sets in ', filename
      nlabels = dallist(filename,DFTAG_SDG, reflist,
     *                         labellist, LISTSIZE, MAXLEN, startpos) 

      do 100 i=1,nlabels
          print *,'  Ref number: ',reflist(i),'  Label: ',labellist(i)
  100 continue

      print *
      print *
      print *, '+++++++++++++++++++++++++'
      print *
      print *
      stop
      end

