minor changes
This commit is contained in:
parent
4c56c1a12f
commit
08e551f194
1 changed files with 3 additions and 2 deletions
|
@ -67,7 +67,7 @@ print "CHAR : $char_encoding\n";
|
|||
my $batch = MARC::Batch->new( 'USMARC', $input_marc_file );
|
||||
$batch->warnings_off();
|
||||
$batch->strict_off();
|
||||
my $i=1;
|
||||
my $i=0;
|
||||
#1st of all, find item MARC tag.
|
||||
my ($tagfield,$tagsubfield) = &MARCfind_marc_from_kohafield($dbh,"items.itemnumber");
|
||||
|
||||
|
@ -75,6 +75,7 @@ while ( my $record = $batch->next() ) {
|
|||
$i++;
|
||||
#now, parse the record, extract the item fields, and store them in somewhere else.
|
||||
$record = MARC::File::USMARC::decode(char_decode($record->as_usmarc(),$char_encoding));
|
||||
warn "==>".$record->as_formatted();
|
||||
my @fields = $record->field($tagfield);
|
||||
print "biblio $i";
|
||||
my @items;
|
||||
|
@ -96,4 +97,4 @@ while ( my $record = $batch->next() ) {
|
|||
NEWnewitem($dbh,$items[$i],$bibid);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue