Dear all,

I want to create records manually, and i am using MARC::Record to do this. Records come out but they are not accepted by e.g. Zebra due to some strange reason. I have been talking with some guys over on the Zebra list, and they seem to be of the oppinion that the fault lies in the MARC record.

Here is shortly my test setup:

I have the following Perl script to generate the test MARC record:

-----

#!/usr/bin/perl -l

use MARC::Record;
use MARC::Lint;

$marc = new MARC::Record;
$lint = new MARC::Lint;

$field_001 = MARC::Field->new('001', '0000000001');
$field_003 = MARC::Field->new('003', 'REALNODE');
$field_005 = MARC::Field->new('005', '20031015153536.0');
$field_100 = MARC::Field->new('100','1','','a' => 'Test Author');
$field_245 = MARC::Field->new('245','0','0','a' => 'Test Title');
$marc->append_fields(($field_001, $field_003, $field_005, $field_100, $field_245));
open OUT, ">0000000001" or die($!);
print OUT $marc->as_usmarc();
close OUT;
$lint->check_record($marc);
print join( "\n", $lint->warnings ), "\n";


----

I have this script saved as test.pl, and when running it, i get no errors, even though i have the Lint-function in MARC::Record in use.

----

[EMAIL PROTECTED] perl]$ ./test.pl


[EMAIL PROTECTED] perl]$


----

Here is the formatted output of the MARC record using the marcdump script supplied with MARC::Record:

----

[EMAIL PROTECTED] zebra]$ marcdump temp_records/000000001
temp_records/000000001
LDR 00154       00085
001     0000000001
003     REALNODE
005     20031015153536.0
100 1  _aTest Author
245 00 _aTest Title

 Recs  Errs Filename
----- ----- --------
    1     0 temp_records/000000001
[EMAIL PROTECTED] zebra]$

----

However, when updating Zebra to index the newly created record, it does not accept this and returns the following 'error':

----

15:44:11-15/10: zebraidx(3122) [log] Zebra version 1.3.10 $Date: 2003/04/01 07:48:21 $
15:44:11-15/10: zebraidx(3122) [log] zebra_start zebra.cfg
15:44:11-15/10: zebraidx(3122) [log] zebra_begin_trans
15:44:11-15/10: zebraidx(3122) [log] updating temp_records
15:44:11-15/10: zebraidx(3122) [log] dir temp_records/
15:44:11-15/10: zebraidx(3122) [warn] empty grs.marc.usmarc temp_records/000000001 0
15:44:11-15/10: zebraidx(3122) [log] zebra_end_trans
15:44:11-15/10: zebraidx(3122) [log] sorting section 1
15:44:11-15/10: zebraidx(3122) [log] writing section 1
15:44:11-15/10: zebraidx(3122) [log] finished section 1
15:44:11-15/10: zebraidx(3122) [log] Iterations . . . 45
15:44:11-15/10: zebraidx(3122) [log] Distinct words . 19
15:44:11-15/10: zebraidx(3122) [log] Updates. . . . . 0
15:44:11-15/10: zebraidx(3122) [log] Deletions. . . . 0
15:44:11-15/10: zebraidx(3122) [log] Insertions . . . 19
15:44:11-15/10: zebraidx(3122) [log] Records: 0 i/u/d 0/0/0
15:44:11-15/10: zebraidx(3122) [log] user/system: 1/1
15:44:11-15/10: zebraidx(3122) [log] zebra_stop
15:44:11-15/10: zebraidx(3122) [log] zebraidx times: 0.09 0.01 0.01
[EMAIL PROTECTED] zebra]$


----

i.e. Zebra treats the record as being empty.

I attach the raw MARC file (000000001) if it helps anyone. All hints are most welcome, since i am getting fairly lost with all different oppinions, since i am no MARC expert.

Thanks in advance!

--
Christoffer Landtman
Oy Realnode Ab
Partner, Sales
+358 (0)41 510 1073
[EMAIL PROTECTED]
www.realnode.fi
00154       00085       
0010011000000030009000110050017000201000016000372450015000530000000001REALNODE20031015153536.01
 aTest Author00aTest Title

Reply via email to