At 4:22 PM -0700 7/13/06, [EMAIL PROTECTED] wrote:
Hi there,

However, can anyone here tell me of any tool or tutorialof how to
create a CIP block out of a MARC 21 record?

I have posted a module, MARC::PCIPmaker.pm to:
<http://home.inwave.com/eija/inprocess/>. It should work to produce an ISBD/PCIP-block display from a raw MARC record (even one coded as full-level, though it is designed for CIP-level records). The code is based on a straight translation of code, originally in Visual Basic (with which I am rather unfamiliar, so the translation may be less than perfect), from the Library of Congress' CIP program.

The module is available in tar.gz or directly (with txt extension added for download/viewing on Web), but I haven't had a chance to create the necessary installation files, so it will need to be manually added to the same folder/directory as MARC::Record to be used.

Synopsis:

#open MARC file, get MARC::Record/MARC::Batch object
#$PCIPrecord = $batch->next in while loop, as generally constructed for most other MARC reading Perl programs

#convert MARC::Record into raw MARC (ISO 2709) format string
my $record_as_marc = $PCIPrecord->as_usmarc();

my ($PCIPblock, @errorsinPCIP) = MARC::PCIPmaker::makecard($record_as_marc);

if (@errorsinPCIP) {
print "The following errors were found in generating the PCIP block\n", join "\n", @errorsinPCIP, "\n";
} #if errors
else {
    print OUT $PCIPblock;
}#else no errors

################################

I hope this helps. Please let me know of any problems or suggestions.

Bryan Baldus
[EMAIL PROTECTED]
http://home.inwave.com/eija

Reply via email to