Re: MARCXML help again

From: Patrick Hochstenbach <Patrick.Hochstenbach_at_nyob>
Date: Thu, 12 Jan 2017 07:38:31 +0000
To: CODE4LIB_at_LISTS.CLIR.ORG
Dear Julie

The Perl project Catmandu https://metacpan.org/pod/Catmandu is targeted to massage data (including MARC). You can install it with this command on a Linux  computer:

$ cpanm Catmandu Catmandu::MARC

To process your file and strip out all the fields with ‘Faux College’ in the 710a field use this command:

$ catmandu convert MARC —type XML to MARC —type XML —fix strip.fix < yourdata.xml

with a ‘strip.fix’ Fix script that looks like:

do marc_each()
  if marc_match(“710a”,”Faux College")
	reject()
  end
end 

Cheers
Patrick
Received on Thu Jan 12 2017 - 02:38:35 EST