Hi all,

Here's another problem I'm having with separating authors. The MARC data I'm 
trying to clean has all the authors in field 100. I want to move added 
authors to 700. I've tried the following script which deletes the 100 fields 
without creating 100/700s:

#######################################################
# 1. Insert indicators into the field 100
# 2. Move added authors to field 700
#######################################################

# Look for tag_100
my @tag_100 = $record->field('100');
$record->delete_field('100');

# Set the title indicator 1
$title_ind1 = '0' if !defined @tag_100;

my $first_author = shift @tag_100;
$first_author->update( ind1 => 1) if $first_author;

$record->append_fields($first_author) if $first_author;

# Move added authors into tag_700
foreach (@tag_100) {
my $author_name = $_->subfield('a');
my $added_author = MARC::Field::new('700', 1,'',
'a' => $author_name
);
$record->append_fields($added_author);
}

Can someone point out where I'm going wrong? Or is there a easier way I can 
simply change the tag number?

Thanks again in advance.

Regards,
Saiful

-- 
Saiful Amin
Information Specialist
Edutech India
8 Khader Nawaz Khan Road
Chennai 600006, India
Tel: +91 44 2833 0999
GSM: +91 98407 76214
Fax: +91 44 2833 1777
www.edutechindia.com <http://www.edutechindia.com>
"Enhancing knowledge and skills for success, lifelong."

Reply via email to