my $db_pass = $ENV{PGPASSWORD};
my $links_removed = 0;
my $links_added = 0;
+my $CNI = 'KCLS';
my %options;
my $result = GetOptions(
next;
}
- my $cni = $target_marc->field('003')->data;
my $acsaf = get_acsaf($e, $field_id);
if (!$acsaf) {
warn "No authority control set field found for $field_id. Skipping\n";
if ($target_string eq $src_string) {
announce("Got a match");
- $field->update('0' => "($cni)$target");
+ $field->update('0' => "($CNI)$target");
$changed = 1;
$links_added++;
}
my $db_port = $ENV{PGPORT} || '5432';
my $db_user = $ENV{PGDATABASE} || 'evergreen';
my $db_pass = $ENV{PGPASSWORD};
+my $CNI = 'KCLS';
my %options;
my $result = GetOptions(
if ($auth_id) {
# Add the auth ID and control number agency info from the
# matching authority record to the controlled bib field.
-
- my $auth_003 = $e->json_query({
- select => {afr => ['value']},
- from => 'afr',
- where => {'+afr' =>
- {tag => '003', record => $auth_id}}
- })->[0];
-
- my $cni = $auth_003->{value} || '';
- $bib_field->add_subfields('0' => "($cni)$auth_id");
$changed = 1;
-
- announce("auth=$auth_id cni=$cni. It's a match!");
+ $bib_field->add_subfields('0' => "($CNI)$auth_id");
+ announce("auth=$auth_id cni=$CNI. It's a match!");
}
}
}