program DB_Xpl02;
uses
   CRT,
   DOS,
   GS_dBFld,
   GS_dBase;
var
   Health  : GS_dBFld_Objt;

begin
   ClrScr;
   Health.Init('HEALTH');
   Health.Open;
   Health.Index('FOODNAME');        {Use Index FOODNAME.NDX}
   Health.GetRec(Top_Record);
   while not Health.File_EOF do
   begin
      writeln(Health.FieldGet('FOOD'),'   ',
              Health.FieldGet('CALS'),'   (',
              Health.FieldGet('FOOD_CODE'),')');
      Health.GetRec(Next_Record);
   end;
   Health.Close;
end.
