1 |
#!/opt/openisis/tcl/bin/isish |
2 |
# |
3 |
# openisis - an open implementation of the ISIS database |
4 |
# Version 0.8.x (microversion see file Version) |
5 |
# Copyright (C) 2003 by Erik Grziwotz, erik@openisis.org |
6 |
# |
7 |
# This library is free software; you can redistribute it and/or |
8 |
# modify it under the terms of the GNU Lesser General Public |
9 |
# License as published by the Free Software Foundation; either |
10 |
# version 2.1 of the License, or (at your option) any later version. |
11 |
# |
12 |
# This library is distributed in the hope that it will be useful, |
13 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
15 |
# Lesser General Public License for more details. |
16 |
# |
17 |
# You should have received a copy of the GNU Lesser General Public |
18 |
# License along with this library; if not, write to the Free Software |
19 |
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
20 |
# |
21 |
# This software is dedicated to the memory of Eckart Dietrich. |
22 |
# |
23 |
# This software is inspired by (but contains no code of) the iAPI |
24 |
# Copyright (C) 2000 by Robert Janusz, rj@jezuici.krakow.pl. |
25 |
# See iAPI.txt for what it contains. |
26 |
# |
27 |
# $Id: testfdt.tcl,v 1.1 2003/05/03 16:40:47 mawag Exp $ |
28 |
# test script for reading fdt from metadb |
29 |
|
30 |
set syspath /opt/openisis/db/mlcm/ADB |
31 |
set db adb |
32 |
set df ISISMARC/fdttest |
33 |
|
34 |
set stb0 [openIsis syspath $syspath] |
35 |
|
36 |
set cfg [$stb0 .req .config] |
37 |
$cfg add fdt $df |
38 |
|
39 |
$stb0 req type open db $db |
40 |
$stb0 .req delete |
41 |
|
42 |
set fdt [$stb0 fdt $db] |
43 |
set flen [$fdt get flen] |
44 |
for {set j 0} {$flen > $j} {incr j} { |
45 |
set fd [$fdt .fd\[$j\]] |
46 |
puts [$fd get -tag] |
47 |
$fd done |
48 |
} |
49 |
$fdt done |
50 |
|
51 |
$stb0 req type close db $db |
52 |
$stb0 .req delete |
53 |
|
54 |
$stb0 done |
55 |
|