pro rd_sxl_data, lun, ibyt, idset, nout, index, data, roadmap, sel_dsets
;+
;NAME:
;	RD_SXL_DATA
;PURPOSE:
;	Perform the actual data read for SXL files (called from RD_XDA)
;INPUT:
;	lun	- the logical unit number where the file is open
;	ibyt	- the starting byte value to read from
;	idset	- the dataset number for the output matrix
;	nout	- the total number of datasets to be extracted
;	index	- the index structure for all output datasets
;	roadmap	- the roadmap
;	sel_dsets- the indicies of the datasets selected for extraction
;INPUT/OUTPUT:
;	data	- the data
;HISTORY:
;	written 19-Apr-93 by M.Morrison
;-
;
common rd_sxl_data_blk, data0
;
if (idset eq 0) then begin
    sxt_struct, sxt_xraylog=data0
    data  = replicate(data0,  nout)
end
if (index(idset).gen.ndatabyte eq 0) then return

rdwrt, 'R', lun, ibyt, 0, data0, 1
data(idset) = data0
;
end
