+ set type [z39.$sno type $no]
+ if {$type == "SD"} {
+ set err [lindex [z39.$sno diag $no] 1]
+ set add [lindex [z39.$sno diag $no] 2]
+ if {$add != {}} {
+ set add " :${add}"
+ }
+ insertWithTags $w "Error ${err}${add}\n" marc-id
+ return
+ }
+ if {$type != "DB"} {
+ return
+ }
+ set rtype [z39.$sno recordType $no]
+ if {$rtype == "SUTRS"} {
+ insertWithTags $w [join [z39.$sno getSutrs $no]] {}
+ $w insert end "\n"
+ return
+ }
+ if {[catch {set r [z39.$sno getMarc $no list * * *]}]} {
+ insertWithTags $w "Unknown record type: $rtype\n" marc-id
+ return
+ }