PROCEDURE (hidden) rap$get_normal_deferred_option (
  installation_parameters, ip: (VAR) ..
*copy rat$installation_parameters
                                  = $required
  status)


*IF $variable(rav$proc_doc,declared)<>'UNKNOWN'

" PURPOSE:
"   This procedure prompts the operator by means of a menu to select one of the available system
"   initiation options for a normal deadstart with deferred products.  System initiation control values
"   are set based on the option selected.
*IFEND


  "$FORMAT=OFF
  VAR
    local_status: status
    selection: string
    menu_selection: string 0..$max_name
    menu_selection_chosen: boolean = false
    parameters: $type(installation_parameters)
    value_selection: string
  VAREND
  "$FORMAT=ON"


get_input: ..
  WHILE NOT menu_selection_chosen DO

    parameters = installation_parameters

    rap$prompt_via_menu menu_module=normal_deferred_menu menu_selections=(production_usage, ..
          console_usage_only, install_installation_tape, install_deferred_products) ..
          prompting_options=clear_screen selection_chosen=selection status=local_status
    menu_selection_chosen = true

    IF local_status.normal THEN

      IF selection = 'PRODUCTION_USAGE' THEN
        parameters.activation_option = 'PRODUCTION'
        parameters.installation_option = 'NONE'

      ELSEIF selection = 'CONSOLE_USAGE_ONLY' THEN
        parameters.activation_option = 'CONSOLE'
        parameters.installation_option = 'NONE'

      ELSEIF selection = 'INSTALL_INSTALLATION_TAPE' THEN
        parameters.activation_option = 'CONSOLE'
        parameters.installation_option = 'INSTALLATION_TAPE'
        rap$get_install_tape_values ip=parameters ms=menu_selection
        IF menu_selection = '+QUIT' THEN
           menu_selection_chosen = false
        IFEND

      ELSEIF selection = 'INSTALL_DEFERRED_PRODUCTS' THEN
        parameters.activation_option = 'MANUAL' "The user is allowed to change this later."
        parameters.installation_option = 'DEFERRED_PRODUCTS'

      IFEND

    ELSE
      EXIT get_input
    IFEND

  WHILEND get_input

  EXIT procedure WITH local_status WHEN NOT local_status.normal
  installation_parameters = parameters

PROCEND rap$get_normal_deferred_option

