4 use MARC::File::XML ( BinaryEncoding => 'utf-8' );
6 use Unicode::Normalize;
10 binmode(STDOUT, ':utf8');
11 binmode(STDIN, ':utf8');
29 foreach my $argnum ( 0 .. $#ARGV ) {
31 print STDERR "Processing " . $ARGV[$argnum] . "\n";
33 my $batch = MARC::Batch->new('XML',$ARGV[$argnum]);
35 $batch->warnings_off();
37 while ( my $record = $batch->next() ) {
41 print STDERR "WARNINGS: Record $count : " . join(":",@warnings) . " : continuing...\n" if ( @warnings );
42 my $my_903a = $record->field('903')->subfield('a'); # target bib id's here
43 my @tags = $record->field('949');
44 foreach my $tag ( @tags ) {
47 $tag->subfield('a') || '', # collection code
48 $tag->subfield('b') || '', # prefix
49 $tag->subfield('c') || '', # call number
50 $tag->subfield('d') || '', # cutter number
51 $tag->subfield('g') || '', # barcode
52 $tag->subfield('h') || '', # serial year
53 $tag->subfield('i') || '', # volume number
54 $tag->subfield('j') || '', # part subdivision 1
55 $tag->subfield('k') || '', # part subdivision 2
56 $tag->subfield('l') || '', # part subdivision 3
57 $tag->subfield('m') || '', # part subdivision 4
58 $tag->subfield('n') || '', # copy number
59 $tag->subfield('o') || '', # accession number
60 $tag->subfield('p') || '', # price
61 $tag->subfield('q') || '', # condition
62 $tag->subfield('5') || '', # magnetic media
63 $tag->subfield('7') || '' # checkin-in/check-out note
68 print STDERR "Processed $count records\n";