On Thu, May 12, 2011 at 11:58:07AM -0400, Nolte, Jennifer wrote:
> I am working on a shell script that will process the MARC records that
> represent items from our e-serials management database, and the thing
> I am stuck on is adding brand new 006 and 007 fixed field tags to each
> record. I am using the marcedit.pl fieldaddtobeg function, but it
> corrupts the records and makes them unparseable.
> 
> Is there a quick and easy way to do this within a script? (I know Perl
> works best with MARC but I am open to any suggestions).
I've written a bunch of MARC manipulation scripts meant to be used at
the command line or in shell scripts; appending 006 and 007 fields would
go something like this:

    $ f006='e    bd...'
    $ f007='aj cafua'
    $ marcappend 006 [ $f006 ] 007 [ $f007 ] < $file | marcgroom -0

It should be pretty obvious what marcappend does; marcgroom reorders
fields within a group (-0 to reorder 0xx fields, -1 to reorder 1xx
fields, etc.).

Holler if you're interested.  These two particular scripts only depend
on Getopt::Long -- I wrote them at a time when I preferred to include
MARC record parsing code in each script rather than using MARC::Record
or some such.

Paul.

-- 
(Insert cute and/or geeky .sig here)

Reply via email to