with Text_Io;
use Text_Io;

separate (Tracker)
procedure Set_Up_Tracker_Data is
    ----------------------------------------------------------------------
    --|
    --|  NAME:  SET_UP_TRACKER_DATA
    --|
    --|  OVERVIEW:
    --|    This procedure opens the tracker input file and calls the
    --|    individual data set_up procedures in a specified order to
    --|    read in the tracker data from the file and set up the
    --|    internal data structures.
    --|
    --|  EXCEPTIONS HANDLED:
    --|    name_error   if the given file can't be opened
    --|    .            raised to the calling routine
    --|    others       ERROR_IN_INPUT_FILE is raised
    --|
    --|  HISTORY:
    --|    Written by   May Lee   March 1985
    --|
    ----------------------------------------------------------------------

    Bad_Data : Boolean := False;

begin
    Vt100.Clear_Screen;
    Put_Line ("Please enter the TRACKER filename: ");
    Get_Line (Tracker_Filename, Filename_Lngth);
    Open (Tracker_File, In_File, Tracker_Filename, "");
    New_Line;
    Put_Line (" Reading the data from file ....  ");
    New_Line;

    begin
        Global_Pkg.Gl_Set_Up;
    exception
        when others =>
            Bad_Data := True;
    end;

    begin
        Activity_Pkg.Ac_Set_Up;
    exception
        when others =>
            Bad_Data := True;
    end;

    begin
        Milestone_Pkg.Ms_Set_Up;
    exception
        when others =>
            Bad_Data := True;
    end;

    begin
        Personnel_Pkg.Pr_Set_Up;
    exception
        when others =>
            Bad_Data := True;
    end;

    begin
        Subsystem_Pkg.Ss_Set_Up;
    exception
        when others =>
            Bad_Data := True;
    end;

    begin
        Element_Pkg.El_Set_Up;
    exception
        when others =>
            Bad_Data := True;
    end;

    Close (Tracker_File);

    if Bad_Data then
        raise Error_In_Input_File;
    end if;
exception
    when Name_Error =>
        raise;
    when others =>
        if Is_Open (Tracker_File) then
            Close (Tracker_File);
        end if;

        raise Error_In_Input_File;
end Set_Up_Tracker_Data;