1 # $Id: display.tcl,v 1.3 1997-04-13 19:00:42 adam 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 {[catch {set r [$zset getMarc $no line * * *]}]} {
29 puts "Unknown record type: $rtype"
33 set tag [lindex $line 0]
34 set indicator [lindex $line 1]
35 set fields [lindex $line 2]
36 puts -nonewline "$tag "
37 if {$indicator != ""} {
38 puts -nonewline $indicator
40 foreach field $fields {
41 set id [lindex $field 0]
42 set data [lindex $field 1]
44 puts -nonewline " \$$id "