RE: sending marc records into a script that uses MARC::Batch

2014-06-03 Thread John E Guillory
Thanks for your ideas. I will try your suggestions. John From: Timothy Prettyman [mailto:timo...@umich.edu] Sent: Friday, May 30, 2014 11:39 AM To: perl4lib Subject: Re: sending marc records into a script that uses MARC::Batch I think you have to check for warnings as you read each record, so

Re: sending marc records into a script that uses MARC::Batch

2014-05-30 Thread Timothy Prettyman
:* Thursday, May 29, 2014 11:23 AM > *To:* John E Guillory > *Cc:* perl4lib@perl.org > *Subject:* Re: sending marc records into a script that uses MARC::Batch > > > > For your first question, instead of: > > > > $batch = MARC::Batch->new(‘USMARC’,); > > >

Re: sending marc records into a script that uses MARC::Batch

2014-05-30 Thread Stefano Bargioni
the script exited prematurely. > > Thanks for assistance. > John > > > > > > > From: Timothy Prettyman [mailto:timo...@umich.edu] > Sent: Thursday, May 29, 2014 11:23 AM > To: John E Guillory > Cc: perl4lib@perl.org > Subject: Re: sending marc re

Re: sending marc records into a script that uses MARC::Batch

2014-05-29 Thread Robin Sheat
John E Guillory schreef op do 29-05-2014 om 21:13 [+]: > “Warnings detected: Entirely empty subfield found in tag 260” An entirely empty subfield is an illegally formatted thing, at least according to the rules of MARC::Record/MARC::Field, and so I assume the MARC format itself. So it's not th

RE: sending marc records into a script that uses MARC::Batch

2014-05-29 Thread John E Guillory
records into a script that uses MARC::Batch For your first question, instead of: $batch = MARC::Batch->new(‘USMARC’,); use: $batch = MARC::Batch->new(‘USMARC’,STDIN); For your second, the error is likely caused when a field you're using as_string() on doesn't exist in the record

Re: sending marc records into a script that uses MARC::Batch

2014-05-29 Thread Timothy Prettyman
For your first question, instead of: $batch = MARC::Batch->new(‘USMARC’,); use: $batch = MARC::Batch->new(‘USMARC’,STDIN); For your second, the error is likely caused when a field you're using as_string() on doesn't exist in the record. So, you could do something like the following: $field

sending marc records into a script that uses MARC::Batch

2014-05-29 Thread John E Guillory
Hello, Two questions please: 1. I've written a script that opens a marc file for reading using this syntax: $file = $ARGV[0]; $batch = MARC::Batch->new('USMARC',$file); It then loops thru the records using this syntax: while ( $record = $batch->next()) { .check position 6, 7