The Library of Congress Online Catalog has two searches associated with 
Z39.50 attr1=8:
  >  one is a keyword search that searches ISSN data in several fields
that contain ISSN data (022, 4XX, 700-730, 76X-78X)
  >  one is a left-match search that search ISSN data in 022 (sfc ayz)

Your search appears to be directed to the keyword query, which is
returning records where ISSN 0896-9205 appears in the 022 field (LCCN
88657600 for Critical sociology) and the 785 field (LCCN 73642052 for The
Insurgent sociologist).

To direct your Z39.50 query to the Voyager left-match index on the 022
field, your query must contain one additional attribute -- the Bib-1
position attribute with value of 1 (for "first-in-field") instead of 3
(for "anywhere").  You could also include the truncation attribute for
"right truncation" -- when you provide the complete ISSN this attribute is
probably not necessary, but it may be helpful when something else in that
field following the ISSN.


You can find more information in the LC Z39.50 Server Configuration
Guidelines at:
   http://www.loc.gov/z3950/lcserver.html

or in the LC Voyager Z39.59 explain record:
   http://www.loc.gov/z3950/lcdbz3950.xml


These searches will illustrate the attributes (using YAZ-client):

Z> f @attr 1=8 "0896-9205"  [Use attribute only]
Number of hits: 2

Z> f @attr 1=8 @attr 3=1 "0896-9205"  [Position included]
Number of hits: 1

Z> f @attr 1=8 @attr 3=1 @attr 5=1 "0896-9205"  [Position and right
truncation included]
Number of hits: 1

If you have questions, please contact Larry Dixson ([EMAIL PROTECTED]) offline.

Ardie Bausenbach
ILS Program Office 
Library of Congress

On Fri, 15 Sep 2006, Sharif Islam wrote:

> I am using the same script to go though a text file that contains issn. 
> After returning the subject for 20 entires (out of 500), the script
> stop with the error mesage:
> "Unspecified error at test.pl line 29"
> line 29 is : my $rec = $rs->record(1)
> The original code was:
> for (my $i = 1; $i <= $n; $i++) {
>  my $rec = $rs->record($i)
>        or die $rs->errmsg();
> my $m = MARC::Record->new_from_usmarc($rec->rawdata());
> print $m->subfield('650',"a"), "\n";
> 
> To get only one entry I got rid of the for loop:
>  
>       my $rec = $rs->record(1)
>          or die $rs->errmsg();
>     my $m = MARC::Record->new_from_usmarc($rec->rawdata());
>     print "$issn\t";
>     print $m->subfield('650',"a"), "\n";
> 
> Any idea? Thanks.
> 
> --sharif
> 
> 
> Sharif Islam wrote:
> 
> > I have this simple scripts that looks up ISSN and returns the subject. 
> > Why it is returning two records for the same ISSN?
> > use strict;  use Net::Z3950;
> > use MARC::Record;
> > use MARC::File::USMARC;
> > use MARC::Field;
> >
> >
> > my $conn = new Net::Z3950::Connection('z3950.loc.gov', 
> > 7090,databaseName => 'Voyager');
> > my $issn="0896-9205";
> > my $query = '@attr 1=8 ' . $issn;
> > $conn->option(preferredRecordSyntax => "USMARC", elementSetName => 'b');
> > my $rs = $conn->search($query)
> >        or die $conn->errmsg();
> > my $n = $rs->size();
> > print "found $n records\n";
> > for (my $i = 1; $i <= $n; $i++) {
> >  my $rec = $rs->record($i)
> >        or die $rs->errmsg();
> > my $m = MARC::Record->new_from_usmarc($rec->rawdata());
> > print $m->subfield('650',"a"), "\n";
> > #print $rec->render();
> > }
> >
> > # perl test.pl
> > found 2 records
> > Sociology
> > Sociology
> >
> 
> 
> -- 
> Sharif Islam                 Research Programmer
> Library Systems Office       University of Illinois Urbana-Champaign
> http://www.library.uiuc.edu  phone:  (217) 244-4688
> 
> 

Reply via email to