;+
; PROJECT:
;           SolarB EIS
;
; NAME:
;           DB_READ_STUDY_ALL_STRUCT
;
; PURPOSE:
;           Function to return ID, Acronym, Title and study Type info of
;           all line lists in the line list database
;
; CATEGORY:
;           EIS Technical Planning
;           Database
;
; INPUTS:
;           none
;
; WRITTEN
;           John A Rainnie, RAL, 7-Oct-2009
;
; MODIFICATION HISTORY
;           v0.1 JAR 10-Feb-2006
;               Using eis_open_db function
;-
;************************************************************************
FUNCTION db_read_study_all_struct

status = eis_open_db(/STUDY)
n      = db_info('entries')

blah  = {id:0,idValue:'',acronym:'',title:'',type:0B,     $
         write_locked:0B,target:'',nrasters:0B}
st_db = REPLICATE(blah , n[0])
;st_db = STRARR(5,n)
FOR i = 1 , n[0] DO BEGIN

    st_db[i-1].id           = dbval(i,'ID')
    st_db[i-1].idValue      = STRING(FORMAT='(I6.6)', dbval(i,'ID'))                        
    st_db[i-1].acronym      = STRTRIM(dbval(i,'ACRONYM'),2)
    st_db[i-1].title        = STRTRIM(dbval(i,'TITLE'),2)
    st_db[i-1].type         = dbval(i,'TYPE')
    st_db[i-1].write_locked = dbval(i,'WRITE_LOCKED')
    st_db[i-1].target       = STRTRIM(dbval(i,'TARGET'),2)
    st_db[i-1].nrasters     = dbval(i,'N_RASTERS')

ENDFOR

dbclose

RETURN , st_db

END
