"  This deck contains commands that allow RAI$SYSTEM_DEADSTART_PROLOG
"  to interact with the operator during deadstart.
"  During recovery and normal deadstart, the PCU and LCU use an
"  exclusive command search to prevent accidental reference to
"  permanent files.  The INCLUDE_LINE command is not available in
"  the exclusive command search.  Because the OSF$BUILTIN_LIBRARY
"  is also not available during the time the system deadstart prolog
"  executes there is no way to have the following packaged in an
"  SCL proc.  Therefore the system deadstart prolog does a
"  COLLECT_TEXT to a file and then does an INCLUDE_FILE each time
"  an interaction is required with the operator.
"  An identical version of this code, packaged as an SCL proc, is in
"  deck RAI$PROMPT_FOR_ANSWER and resides in OSF$BUILTIN_LIBRARY.


" Avoid two blank lines if prompt is a null string"
  IF cmv$prompt <> '' THEN
    display_value ('  ', cmv$prompt)
  IFEND

answer_loop: ..
LOOP
  accept_line cmv$choice input prompt=' Enter yes or no: '
  cmv$choice = $translate(lower_to_upper, cmv$choice)
  IF (cmv$choice = 'Y' OR cmv$choice = 'YES') THEN
    cmv$intervene = true
    EXIT answer_loop
  ELSEIF (cmv$choice = 'N' OR cmv$choice = 'NO') THEN
    cmv$intervene = false
    EXIT answer_loop
  ELSE
    display_value ('  ', '** Error:  You must enter yes or no.', '  ** ')
  IFEND
LOOPEND answer_loop

