Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Tree: 216d2fe231
Fetching contributors…

Cannot retrieve contributors at this time

40 lines (27 sloc) 0.893 kB
# This short script removes breaking 000 fields from NORMARC
# Unix:
# inputfile.mrc > outputfile.xml
($input) = @ARGV;
use MARC::Batch;
use MARC::Record;
use MARC::Field;
if (not (-f $input)) { die "Input file \"$input\" does not exist!"}
# if (not ($output)) { die "You must specify an output file!"}
my $batch = MARC::Batch->new( 'USMARC', $input );
# turn off strict so process does not stop on errors
my $rec_count = 0;
while (my $record = $batch->next()) {
#get all 000s
my @m000 = $record->field('000');
print $record->as_usmarc();
#print "\n$rec_count records processed\n";
#print "----------------------------\n";
# make sure there weren't any problems.
#if ( my @warnings = $batch->warnings() ) {
# print "\nWarnings were detected!\n", @warnings;
# }
Jump to Line
Something went wrong with that request. Please try again.