PROCEDURE select_operator_menu, select_operators_menu, selom (
  execute_option, eo: key
      execute, extract, generate
    keyend = execute
  status)

"-----------------------------------------------------------------------------"
" Access procedure for the NOS/VE Operators Menu System.  The menu system     "
" should only be accessed from within the SYSTEM_OPERATOR_UTILITY (SOU).      "
"                                                                             "
" To modify the menu system, use the eo=extract option to get the SCL source  "
" from the object library.  Use the eo=generate option to create a new object "
" library from the modified SCL procedures.  The default eo=execute option    "
" will access the NOS/VE Operators Menu System.                               "
"                                                                             "
" Copyright Control Data Systems Inc. 1992                                    "
"-----------------------------------------------------------------------------"

  VAR
    euf$operator_menu_library : (PUSH) file
  VAREND

  IF NOT $variable(euf$operator_menu_library, initialized) THEN
    euf$operator_menu_library = $system.menu_ve.euf$operator_menu_library
  IFEND

  IF execute_option = execute THEN

    PUSH command_list
    create_command_list_entry entry=euf$operator_menu_library
    op_main_menu
    POP command_list

  ELSEIF execute_option = extract THEN

    CREATE_OBJECT_LIBRARY
      add_module library=euf$operator_menu_library
      generate_library library=$local.op_menu_source.$boi format=scl_proc
    QUIT
    put_line ' Extracted operator menu source written to file $LOCAL.OP_MENU_SOURCE'

  ELSEIF execute_option = generate THEN

    CREATE_OBJECT_LIBRARY
      add_module library=$local.op_menu_source
      generate_library euf$operator_menu_library//$next
    QUIT
    put_line ' Operator menu object library generated on file '//euf$operator_menu_library

  IFEND

PROCEND select_operator_menu
