1 # $Id: display.tcl,v 1.1 1998-09-30 10:53:54 perhans Exp $
4 proc display {zset no} {
5 set type [$zset type $no]
7 set err [lindex [$zset diag $no] 1]
8 set add [lindex [$zset diag $no] 2]
12 puts "Error ${err}${add}"
18 set rtype [$zset recordType $no]
19 if {$rtype == "SUTRS"} {
20 puts [join [$zset getSutrs $no]]
23 if {$rtype == "GRS-1"} {
24 set r [$zset getGrs $no]
28 if {$rtype == "Explain"} {
29 set r [$zset getExplain $no]
33 if {[catch {set r [$zset getMarc $no line * * *]}]} {
34 puts "Unknown record type: $rtype"
38 set tag [lindex $line 0]
39 set indicator [lindex $line 1]
40 set fields [lindex $line 2]
41 puts -nonewline "$tag "
42 if {$indicator != ""} {
43 puts -nonewline $indicator
45 foreach field $fields {
46 set id [lindex $field 0]
47 set data [lindex $field 1]
49 puts -nonewline " \$$id "