develooper Front page | perl.perl4lib | Postings from March 2007

RE: trailing $ on Cat source <040 field>

Thread Previous | Thread Next
From:
Bryan Baldus
Date:
March 30, 2007 12:00
Subject:
RE: trailing $ on Cat source <040 field>
Message ID:
1F95E99A11EFA541B0BDE754166A8F7001605F47@qbiex.qbi.quality-books.com
On Friday, March 30, 2007 12:29 PM, Jackie Shieh wrote:
>I was working with a group of records that
>the cataloging source for some of them ends
>with a dollar sign (see attached records):
>
>040   $aEL$$bspa$cEL$$dDLC
>040   $QD$$cQD$
>
>Sometimes, it helps to convert MARC file
>to MARCMaker format to review. When I do,
>curiously, MARC::Record is not able to read
>it back in as_usmarc as the trailing dollar
>immediately followed by another subfield has
>caused MARC::Record treat it as an empty subfield.

When I open the .mrc file you attached, I see that the 040 reads
EL\x1F$bspa\x1FcEL$. In other words, you have a subfield $ instead of
subfield b. The .mkr file you attached has EL$$bspa$cEL$.

When I convert the .mrc file into a .mrk using MarcEdit, I get:
EL${dollar}bspa$cEL{dollar}, which is technically how the field appears. If
I convert the file with MARC::File::MARCMaker [1], I get:
EL$$bspa$cEL{dollar}. This points to a possible bug in MARCMaker, in that it
makes it impossible to reverse the process and produce an identical .mrc
file. I believe the reason it didn't change the dollar sign to {dollar} in
the 1st instance is because it only converts subfield data, not subfield
codes (assuming that the codes will be characters not needing to be escaped.
This may be a flawed assumption.).

Editing the 040 to have the dollar sign in subfield a followed by the
delimiter character produces EL{dollar}$bspa$cEL{dollar} when using both
MarcEdit and the Perl module.

[1] Latest version on
<http://marcpm.cvs.sourceforge.net/marcpm/marc-marcmaker/>, CPAN version on
<http://search.cpan.org/~eijabb/MARC-File-MARCMaker-0.05/>. SourceForge
version has recently updated mrc2mkr and mkr2mrc programs in bin/.

I hope this helps,

Bryan Baldus
bryan.baldus@quality-books.com
eijabb@cpan.org
http://home.inwave.com/eija
 

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About