I don't see how you can get a result for your search if you're using @attr 1=7. 7 is the USE attribute for an ISBN search, and your term is the local system number, I think (use attribute=12)
When I do that search (@attr 1=12 3118006) against the LC bib file, using Net::Z3950 in a program essentially the same as yours, the USMARC record returned is 860 bytes long. Here's a formatted dump of the record:
LDR 00860nam 22002531 4500
001 3118006
005 19740417000000.0
008 731207s1967 nyuabf b 000 0beng
035 |9(DLC) 67029856
906 |a7|bcbc|corignew|du|eocip|f19|gy-gencatlg
010 |a 67029856
040 |aDLC|cDLC|dDLC
050 00 |aND588.D9|bR85
082 00 |a759.3
100 1 |aRussell, Francis,|d1910-
245 14 |aThe world of D?urer, 1471-1528,|cby Francis Russell and the editors of Time-Life Books.
260 |aNew York,|bTime, inc.|c[1967]
300 |a183 p.|billus., maps, col. plates.|c32 cm.
490 0 |aTime-Life library of art
504 |aBibliography: p. 177.
600 10 |aD?urer, Albrecht,|d1471-1528.
710 2 |aTime-Life Books.
991 |bc-GenColl|hND588.D9|iR85|tCopy 1|wBOOKS
991 |bc-GenColl|hND588.D9|iR85|p00034015107|tCopy 2|wCCF
The "?" in the 245 and 600 fields are 0xE8, the MARC-8 code for combining umlaut/diaeresis.
It's puzzling that the record you got has a different length--not sure what's going on there.
Tim Prettyman University of Michigan Library
# define sum constants my $DATABASE = 'voyager'; my $SERVER = 'z3950.loc.gov'; my $PORT = '7090';
# create a LOC (Voyager) 001 query my $query = "[EMAIL PROTECTED] 1=7 3118006";
# create a z39.50 object my $z3950 = Net::Z3950::Manager->new(databaseName => $DATABASE);
# assign the object some z39.50 characteristics $z3950->option(elementSetName => "f"); $z3950->option(preferredRecordSyntax => Net::Z3950::RecordSyntax::USMARC); # connect to the server and check for success my $connection = $z3950->connect($SERVER, $PORT);
# search my $results = $connection->search($query);
# get the found record and turn it into a MARC::Record object my $record = $results->record(1); $record = MARC::Record->new_from_usmarc($record->rawdata());
# create a file name my $id = time;
# write the record open MARC, "> $id.marc"; print MARC $record->as_usmarc; close MARC;
This process works just fine for records that contain no diacritics, but when diacritics are in the records extra characters end up in my saved files, like this:
00901nam 22002651 ^^^ 45000010008000000050017000080080041000250350021000669060045000870 10001700132040001800149050001800167082001000185100002900195245009 20022426000340031630000470035049000290039750400260042660000340045 27100021004869910044005079910055005510990029006063118006 19740417000000.0731207s1967 nyuabf b 000 0beng 9(DLC) 67029856 a7bcbccorignewdueocipf19gy-gencatlg a 67029856 aDLCcDLCdDLC00aND588.D9bR8500a759.31 aRussell, Francis,d1910-14aThe world of Dˆ®urer, ^^^^^^^ 1471-1528,cby Francis Russell and the editors of Time-Life Books. aNew York,bTime, inc.c[1967] a183 p.billus., maps, col. plates.c32 cm.0 aTime-Life library of art aBibliography: p. 177.10aDˆ®urer, Albrecht,d1471-1528.2 ^^^^^^^ aTime-Life Books. bc-GenCollhND588.D9iR85tCopy 1wBOOKS bc-GenCollhND588.D9iR85p00034015107tCopy 2wCCF arussell-world-1071495663
Notice how Dürer got munged into Dˆ®urer, twice, and consequently the record length is not 901 but 903 instead.
Some people say I must be sure to request a specific character set from the LOC when downloading my MARC records, specifically MARC-8 or MARC-UCS. Which one of these character sets do I want and how do I tell the remote database which one I want?
-- Eric "The Ugly American Who Doesn't Understand Diacritics" Morgan University Libraries of Notre Dame
(574) 631-8604