pro rd_cba_data, lun, ibyt, idset, nout, index, data, roadmap, sel_dsets
;+
;NAME:
;	RD_CBA_DATA
;PURPOSE:
;	Perform the actual data read for CBA 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 21-Mar-92 by Mons Morrison
;-
;
common rd_cba_data_blk, data0
;
cba_struct
;
if (idset eq 0) then begin
    data0  = {cba_data_rec}
    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
