#! /usr/bin/perl
#  /usr/lpp/ssp/perl/bin/perl

##  This perl pgm removes reports whose date of observation is in the
#   future, according to the current system clock.

$today=`date "+%Y%m%d"` ;

while (<>) 
{     chop;
     ($id, $yr, $mon, $day) = split ( " ", $_);
      $daterec = ($yr * 10000) + ($mon * 100) + $day ;
      unless ( $daterec > $today)
         { printf "%s\n", $_ ; }
} 
