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