To list issues, do: LIST ONLOAN @ID FMT “15L” F1 OL.RDATE ID-SUPP HDR-SUPP COL-HDR-SUPP NOPAGE (log to file 'issues')
issuesprep.pl:
use strict;
my ($input,$accno,$borrno,$datedue,);
open(INFILE, “issues”); open(OUTFILE, ”>iss”);
LEAD: while (<INFILE>) {
last LEAD if (/NOPAGE/); # test for word NOPAGE
} # gets rid of leading garbage LINE: while (<INFILE>) {
last LINE if (/records listed/); # stop before trailing garbage $input = crop($_); if ($input =~ /(\S+)\s+(\S+)\s+(\S+)/) { $accno = $1; $borrno = $2; my @dates = split /\//, $3; $datedue = "$dates[2]-$dates[0]-$dates[1]"; print OUTFILE "$accno\t$borrno\t$datedue\n"; }
}
close INFILE; close OUTFILE;
sub crop {
my $line=""; chomp $_[0]; chop $_[0]; # raw data also has \r if ($_[0] =~ /\[H\[J/) { # strip cursor character $line = "$`$'"; } else { $line =$_[0]; } return $line;
}