I am trying to create a perl program using Net::Z3950 to connect to and search 
the proquest dissertations and theses database. I can connect and search via 
YAZ, but am having no luck via perl/Net::Z3950.

Here's the perl program:
use Net::Z3950;
$mgr = new Net::Z3950::Manager(
        user=>'[user]',
        pass=>'[password]',
        );
$target = 'proquest-z3950.umi.com';
$port = '210';
$database = 'PQD';
$recordSyntax = 'SUTRS';
$conn = new Net::Z3950::Connection($mgr, $target, $port, databaseName 
=>$database) or die "$!\n";
$rs = $conn->search(-prefix => '@and @attr 1=4 steamboat bertrand') or die 
"$!\n";
$count = $rs->size();
print "$count\n" and die;

When I have the "$!\n"; in the '$rs = ' line, I always get the message 
"Operation in progress". 
When I remove the "$!\n"; in the '$rs = ' line, and it falls through to $count 
= $rs->size(); , I get:
Can't call method "size" on an undefined value at ./zd line 13.
-------------------------------------------------------------------
The sequence of commands from the corresponding YAZ session, which is 
successful, follows. Can anyone suggest why the perl program is failing on what 
appears to be an identical sequence in YAZ?
-------------------------------------------------------------------
Z> open proquest-z3950.umi.com:210/PQD
Connecting...OK.
Sent initrequest.
Connection accepted by v3 target.
ID     : 1996
Name   : ProQuest Information and Learning
Version: 1.0
UserInformationfield:
{
    OID: 1 2 840 10003 10 1000 17 1
    {
        ANY (len=49)
    }
}
OCLC UserInformation:
{
    motd 'Welcome to the ProQuest Z39.50 Gateway'
    dblist {
        'PQD'
    }
}
Options: search present scan namedResultSets
Z> find @and @attr 1=4 steamboat bertrand
Sent searchRequest.
Received SearchResponse.
Search was a success.
Number of hits: 1, setno 1

Anne L. Highsmith
Consortia Systems Coordinator
5000 TAMU
Evans Library
Texas A&M University
College Station, TX   77843-5000
[EMAIL PROTECTED]
979-862-4234
979-845-6238 (fax) 

Reply via email to