;+
; PROJECT
;          SolarB EIS
;
; NAME
;          EIS_STUDY_FLAG_AS_OBSOLETE
;
; CATEGORY
;          EIS planning
;
; PURPOSE
;          Function to set the study definition flag WRITE_LOCKED to
;          unity - indicating that this is an obsolete study
;
; INPUTS
;          st_id - id of study
;
; WRITTEN
;          John A Rainnie, RAL, 13-March-2007
;
; VERSION
;          V0.1 JAR 30-Nov-2007
;              Use study database tag WRITE_LOCKED instead of TYPE
;
;-
;************************************************************************
PRO eis_study_flag_as_obsolete , st_id

DEFSYSV , '!PRIV', 2

status = eis_open_db(/STUDY,/UPDATE)
;
; Update database entry with new value
dbput, 'WRITE_LOCKED' , 1 , st_id

print,"Flagged study id = " + STRCOMPRESS(st_id,/REMOVE_ALL) +             $
            " as obsolete"

END
