>Has anyone sorted a file of hundreds of records by 001?

I haven't done sorting yet, but you may want to see if my MARC::BBMARC's
[1], MARC::BBMARC::updated_record_hash()  sub may be of use. It reads a file
of MARC records and stores them in a hash with the 001 as key, the raw MARC
as value. It should be fairly simple, then, to use this to output the
desired records in the proper order. It should work ok on small files of
MARC records, but depending on your system's memory, may die a horrible
death on large record sets.

My extractbycontrolno script [2] reads a file of control numbers (using
BBMARC's updated_record_array() to save memory) and a separate file of MARC
records, and outputs the matching records. It doesn't do any sorting, so it
depends on the order it finds the records.

[1] MARC::BBMARC is available directly from my homepage at:
<http://home.inwave.com/eija/bryanmodules/>, 
or bundled with MARC::Errorchecks on CPAN
<http://search.cpan.org/~eijabb/MARC-Errorchecks-1.06/>
[2]
http://home.inwave.com/eija/fullrecscripts/Extraction/extractbycontrolno.txt

Hope this helps,

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

Reply via email to