From: | Steven McPhillips <smcphillips [...] nla.gov.au> |
To: | "'bug-MARC-Record [...] rt.cpan.org'" <bug-MARC-Record [...] rt.cpan.org> |
Subject: | not a bug - more a feature request / troubleshoot |
Date: | Thu, 14 Aug 2003 09:55:34 +1000 |
Hiya,
(duplicate of the feature request I submitted on sourceforge)
I'm getting raw marc data from a database, not from a file. I was wondering
how difficult it would be to create a MARC::Record from my scalar variable,
as opposed to having to print it out to a file, and open the filehandle
using MARC::Batch or similar...
my sample code:
Show quoted text
$dbh = DBI-
Show quoted text
>>
>connect('dbi:Oracle:LIBR','train_treaddb','train_treaddb');
$sth = $dbh->prepare("select marc_record from bibblob_vw
".
"where bib_id =".$p);
$sth->execute();
@row =
$sth->fetchrow_array();
$sth->finish;
$dbh-
Show quoted text>disconnect;
#this is the marc scalar
$line =
@row[0];
<<
So, I'd like to be able to create a MARC::Record from my $line var. I've
tested the validity of the data by writing another script that dumps $line
to a file, then reads the file in - that part works great!
Many thanks,
Steve
----
Steven McPhillips
Business Systems Support
National Library of Australia
phone: + 61 2 62621413
fax: + 61 2 62571703