[Koha-devel] creating MARC records

Bryan Baldus eijabb at cpan.org
Mon Nov 10 14:38:17 CET 2008


At 8:03 PM +1100 11/10/08, Rick Welykochy wrote:
>The code I have adapted to create a MARC field looks like this:
>
>    MARC::Field->new($tag,'','',$subfields)
>
>The second and third args were provided as empty strings by the original
>scripts I am adapting. The marclint program complains that the
>field indicators #1 and #2 are blank.
>
>What should they be? How does one find out?

The indicators differ by tag number. There should be no indicators in 
fields less than 010. For the others, see the MARC 21 documentation:
<http://www.loc.gov/marc/bibliographic/ecbdhome.html>


>ISSUE #2:
>    print $marcrec->as_usmarc;
>
>Is that the correct way to output the MARC record in binary format?
>
>Is there really that much difference between USMARC and MARC21? My brief
>research on the web indicates that the answer to this last question is:
>"No, not really."
>

Yes, that is the correct way to output a raw MARC file. USMARC is the 
old name for MARC 21. They have the same file structure, but some 
definitions of fields, etc. have been added, deleted, and/or changed. 
The Perl module uses "USMARC", but it has been updated to account for 
any differences between USMARC and MARC 21 (as well as the other MARC 
flavor used by Koha in ISO 2709 format).

I hope this helps,

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



More information about the Koha-devel mailing list