#! /usr/bin/perl


$\ = "\n";
$| = 1;

open (OUT, ">results");


#
# Get the first 200 documents by their internal record number
#

for ($a=1; $a<200; $a++){
 $text = "";

open (BSS, "| i1+ -silent > t1"); ### Open communication with BSS
 print BSS "ch ft_96";    #
 print BSS "set mem=1";   # Send commands to BSS
 print BSS "s irn=$a";    #
close(BSS);

open (TEMP, "t1");
  while ($in = <TEMP>){              #
  chop $in;                          #  Read output from BSS
  $text = $text . " " . $in;         #
  };
close(TEMP);

 print OUT $text;
};

$rm = `rm t1`;

