[inherit('sys$library:starlet','lib$spawn','smgdefs','smg$repaint_line',
'BB.PEN')]
module choose_database;

[global] procedure choose_database;

{This module must be edited to reflect the number and names of the
 data base files and count files for each site where this utility
 is to be run.}

begin
  write_menu('Category number:',' ');

  repeat
    topic_option := getchar;
    smg$erase_display(error_display);
    smg$unpaste_virtual_display(error_display,pasteboard);

    {At NRL we have 3 categories of topics.}
    case topic_option of
      '1' : begin
              chosen_file := 'bb$local_boards.dat';
              count_location := 'bb$local_count.dat';
            end;
      '2' : begin
              chosen_file := 'bb$bitnet_boards.dat';
              count_location := 'bb$bitnet_count.dat';
            end;
      '3' : begin
              chosen_file := 'bb$research_boards.dat';
              count_location := 'bb$research_count.dat';
            end;
      '4' : goto99
      otherwise
        write_error('Valid choices are 1,2,3 or 4.',error_condition:=true);
    end;
    smg$set_physical_cursor(pasteboard,23,19);
  until (topic_option in ['1','2','3','4']);

  t_menu := false;

end;
end.
