{ # $Id: msearch.egw,v 1.2 1995/11/08 16:14:33 adam Exp $ if {[info commands saveState] == ""} { source z39util.tcl } global sessionWait global nextSetNo global setNo global hist global zstatus if {[wform menu1] == ""} { set setNo [lindex $sessionParms 0] } else { if {![info exists hist($nextSetNo,0,host)]} { set hist($nextSetNo,0,host) $hist($setNo,0,host) for {set i 1} {$i <= $hist($setNo,0,host)} {incr i} { set hist($nextSetNo,$i,host) $hist($setNo,$i,host) set hist($nextSetNo,$i,database) $hist($setNo,$i,database) } } set setNo $nextSetNo incr nextSetNo for {set i 1} {$i <= $hist($setNo,0,host)} {incr i} { set hist($setNo,$i,query) [build-query $hist($setNo,$i,host)] } set hist($setNo,maxPresent) [wform hits] if {$hist($setNo,maxPresent) == ""} { set hist($setNo,maxPresent) 30 } } html " WWW/Z39.50 Gateway Search \n" html "\n" z39msearch $setNo 1 html "
\n" set not $hist($setNo,0,host) for {set i 1} {$i <= $not} {incr i} { if {$zstatus($i) != 2} continue html "
" $hist($setNo,$i,host) ": " set status [z39$i.$setNo responseStatus] if {[lindex $status 0] == "NSD"} { z39$i.$setNo nextResultSetPosition 0 set code [lindex $status 1] set msg [lindex $status 2] set addinfo [lindex $status 3] html "Error\n
NSD$code: $msg: $addinfo" } else { set r [z39$i.$setNo resultCount] html "$r hits\n
\n" display-rec 1 $hist($setNo,$i,offset) display-brief z39$i } html "\n" } html "
\n" }
{ html { New target } " | \n" html { New query } } { html "
\n" html "

Debug information

\n" html "sessionId: $sessionId
\n" html "sessionParms: $sessionParms
\n" foreach e {SERVER_NAME PATH_INFO SCRIPT_NAME} { html $e {: } $env($e) {
} \n } html "form: " [wform] "
\n" html "target: " $host "
\n" html "query: --" $hist($setNo,1,query) "--
" html "setNo: " $setNo "
\n" html "nextSetNo: " $nextSetNo "
\n" }