program InitProductFile;

const   MaxNumberProducts = 100;

type    ProductName = string[20];
        product = record
                    Name: ProductName;
                    ItemNumber: Integer;
                    InStock: Real;
                    supplier: integer;
                  end;

var     productFile: file of Product;
        ProductRec: Product;
        I: Integer;

begin

   Assign(ProductFile,'Product.dta');
   Rewrite(ProductFile);
   with ProductRec do
   begin
      Name := ''; InStock := 0; Supplier  := 0;
      for I := 1 to MaxNumberProducts do
      begin
         ItemNumber := I;
         Write(ProductFile,ProductRec);
      end;
   end;
   Close(ProductFile);
end.
