set {profile(Data Research Associates,targetInfoName)} {}
set {profile(Data Research Associates,timeDefine)} 944954622
set {profile(Data Research Associates,timeLastExplain)} {}
-set {profile(Data Research Associates,timeLastInit)} 955717347
+set {profile(Data Research Associates,timeLastInit)} 983197460
set {profile(Data Research Associates,welcomeMessage)} {}
set {profile(Data Research Associates,windowNumber)} 5
set profile(Default,authentication) {}
set profile(Default,timeLastExplain) {}
set profile(Default,timeLastInit) {}
set profile(Default,welcomeMessage) {}
-set profile(Default,windowNumber) 20
+set profile(Default,windowNumber) 21
set {profile(Emory Library Catalog,authentication)} {}
set {profile(Emory Library Catalog,comstack)} tcpip
set {profile(Emory Library Catalog,databases)} unicorn
set {profile(Emory Library Catalog,timeLastInit)} 971250665
set {profile(Emory Library Catalog,welcomeMessage)} {}
set {profile(Emory Library Catalog,windowNumber)} 9
+set profile(LOC,authentication) {}
+set profile(LOC,comstack) tcpip
+set profile(LOC,databases) voyager
+set profile(LOC,description) {}
+set profile(LOC,host) z3950.loc.gov
+set profile(LOC,idAuthentication) {}
+set profile(LOC,largeSetLowerBound) 2
+set profile(LOC,maxResultSets) {}
+set profile(LOC,maxResultSize) {}
+set profile(LOC,maxTerms) {}
+set profile(LOC,maximumRecordSize) 50000
+set profile(LOC,mediumSetPresentNumber) 0
+set profile(LOC,multipleDatabases) 0
+set profile(LOC,namedResultSets) 1
+set profile(LOC,port) 7090
+set profile(LOC,preferredMessageSize) 30000
+set profile(LOC,presentChunk) 4
+set profile(LOC,protocol) Z39
+set profile(LOC,queryCCL) 0
+set profile(LOC,queryRPN) 1
+set profile(LOC,recentNews) {}
+set profile(LOC,smallSetUpperBound) 0
+set profile(LOC,targetInfoName) {}
+set profile(LOC,timeDefine) 983197488
+set profile(LOC,timeLastExplain) {}
+set profile(LOC,timeLastInit) 983197499
+set profile(LOC,welcomeMessage) {}
+set profile(LOC,windowNumber) 20
set {profile(OCLC First Search,authentication)} {}
set {profile(OCLC First Search,comstack)} tcpip
set {profile(OCLC First Search,databases)} {INSPEC HumanitiesIndex LibraryLiterature LegalPeriodicals MarcWorldCat Medline NewYorkTimes}
--- /dev/null
+#!/usr/bin/tclsh
+# $Id: msearch.tcl,v 1.1 2001-03-26 11:39:35 adam Exp $
+# Simple multi-target search
+
+if {[catch {ir-log-init all irtcl shell.log}]} {
+ set e [info sharedlibextension]
+ puts "Loading irtcl$e ..."
+ load ./irtcl$e irtcl
+ ir-log-init all irtcl shell.log
+}
+
+proc msearch {targets query pending} {
+ global $pending
+
+ set n 0
+ foreach t $targets {
+ ir z.$n
+ z.$n databaseNames [lindex $t 1]
+ ir-set z.$n.1 z.$n
+ z.$n failback [list fail-response $targets $n $query $pending]
+ z.$n callback [list connect-response $targets $n $query $pending]
+ incr n
+ }
+ set n 0
+ foreach t $targets {
+ if {[catch {z.$n connect [lindex $t 0]}]} {
+ fail-response $targets $n
+ }
+ incr n
+ }
+ set $pending $n
+}
+
+proc fail-response {targets n query pending} {
+ global $pending
+
+ puts "[lindex $targets $n]: failed"
+ incr $pending -1
+}
+
+proc connect-response {targets n query pending} {
+ global $pending
+
+ puts "[lindex $targets $n]: connect response"
+ z.$n callback [list init-response $targets $n $query $pending]
+ if {[catch {z.$n init}]} {
+ incr $pending -1
+ }
+}
+
+proc init-response {targets n query pending} {
+ global $pending
+
+ puts "[lindex $targets $n]: init response"
+ if {![z.$n initResult]} {
+ puts "connection rejected: [z.$n userInformationField]"
+ incr $pending -1
+ } else {
+ z.$n callback [list search-response $targets $n $query $pending]
+ if {[catch {z.$n.1 search $query}]} {
+ puts "[lindex $targets $n]: bad query $query"
+ incr $pending -1
+ }
+ }
+}
+
+proc search-response {targets n query pending} {
+ global $pending
+
+ puts "[lindex $targets $n]: search response"
+ set sstatus [z.$n.1 searchStatus]
+ if {$sstatus} {
+ set h [z.$n.1 resultCount]
+ puts "[lindex $targets $n]: search ok"
+ puts "[lindex $targets $n]: $h hits"
+ } else {
+ puts "[lindex $targets $n]: search failed"
+ }
+ incr $pending -1
+}
+
+msearch {{bagel.indexdata.dk gils} {localhost:9999 Default} {z3950.bell-labs.com books}} utah ok
+
+# This looping is optional if you're using Tk (X11)
+while {$ok} {
+ vwait ok
+}
+puts "Finished searching"