infil = 'refdata:hda900615.1355
;
lun = 1
close, lun
openu, lun, infil
;
fhead		= {file_header_rec}
gen_index	= {gen_index_rec}
hxt_index	= {hxt_index_rec}
;
qdebug = 1
ndatasets = 0
;
ibyt = 368
while (ibyt lt 100000) do begin
    ibyt0 = ibyt
    if (qdebug) then print, 'Dset = ', ndatasets+1, '  ibyt = ', ibyt0

    rdwrt, 'R', lun, ibyt, rsiz, Gen_Index, 1
    rdwrt, 'R', lun, ibyt, rsiz, HXT_Index, 1

    if (qdebug) then print, 'Time = ', gen_index.time
    if (qdebug) then print, 'GEN_Index.nIndexByte =', GEN_Index.nIndexByte
    if (qdebug) then print, 'GEN_Index.nDataByte =', GEN_Index.nDataByte

    ibyt = ibyt0 + GEN_Index.nIndexByte + Gen_Index.nDataByte
    nDataSets = nDataSets + 1

    in = ' '
    read, 'Pause', in
end
;
end
