;+
; PROJECT
;          SolarB EIS
;
; NAME
;          EIS_STUDY_FLAG_AS_DEPRECATED
;
; CATEGORY
;          EIS planning
;
; PURPOSE
;          Function to set the study definition flag WRITE_LOCKED to
;          2 - indicating that this is a deprecated study
;
; INPUTS
;          st_id - id of study
;
; WRITTEN
;          John A Rainnie, RAL, 7-Jan-2008
;
; VERSION
;          #V0.1 JAR 30-Nov-2007
;          #    Use study database tag WRITE_LOCKED instead of TYPE
;
;-
;************************************************************************
PRO eis_study_flag_as_deprecated , st_id

DEFSYSV , '!PRIV', 2

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

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

END
