- if {[catch {z39 callback ok-response}]} {
- ir z39
- }
- if {$newHost != $host} {
- set host $newHost
- z39 disconnect
- z39 callback ok-response
- z39 failback fail-response
-
- htmlr {Connecting to target } $host { <br>}
- set sessionWait 0
- if {[catch {z39 connect $host}]} {
- htmlr "Cannot connect to target ${host} <br>"
- htmlr "</body></html>"
- wabort
- } elseif {$sessionWait == 0} {
- zwait sessionWait
- if {$sessionWait != 1} {
- htmlr "Cannot connect to target ${host} <br>"
- htmlr "</body></html>"
+ set b [wform base]
+ if {[wform baseall] != ""} {
+ set hist($setNo,database) $databases
+ } elseif {$b == ""} {
+ set hist($setNo,database) $databases
+ } else {
+ set hist($setNo,database) $b
+ }
+ set hist($setNo,maxPresent) [wform hits]
+ if {$hist($setNo,maxPresent) == ""} {
+ set hist($setNo,maxPresent) 30
+ }
+ for {set i 1} {$i <= 3} {incr i} {
+ if {[wform scan$i] != ""} {
+ set scanNo 1000
+ set hist($setNo,scan) $i
+ set termPlusAttr [build-scan $hist($setNo,host) $i]
+ set hist($setNo,$scanNo,scanTerm) [lindex $termPlusAttr 0]
+ set hist($setNo,scanAttr) [lindex $termPlusAttr 1]
+ start-scan $scanNo 0 {}
+ html "</body></html>\n"