File: manref.xml

package info (click to toggle)
yaz 3.0.34-2
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 13,404 kB
  • ctags: 12,108
  • sloc: xml: 116,075; ansic: 52,205; sh: 9,746; tcl: 2,043; makefile: 1,141; yacc: 347
file content (3109 lines) | stat: -rw-r--r-- 107,939 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
<!--Generated by stripref.xsl . Do not edit-->
<refentry id="yaz-client">
 <refentryinfo>
  <productname class="trade">YAZ</productname>
  <productnumber>3.0.28</productnumber>
 </refentryinfo>
 
 <refmeta>
  <refentrytitle>yaz-client</refentrytitle>
  <manvolnum>1</manvolnum>
 </refmeta>
 
 <refnamediv>
  <refname>yaz-client</refname>
  <refpurpose>Z39.50/SRU client for implementors</refpurpose>
 </refnamediv>

 <refsynopsisdiv>
  <cmdsynopsis sepchar=" ">
   <command moreinfo="none">yaz-client</command>
   <arg choice="opt" rep="norepeat"><option>-a <replaceable>filename</replaceable></option></arg>
   <arg choice="opt" rep="norepeat"><option>-b <replaceable>filename</replaceable></option></arg>
   <arg choice="opt" rep="norepeat"><option>-c <replaceable>filename</replaceable></option></arg>
   <arg choice="opt" rep="norepeat"><option>-d <replaceable>dump</replaceable></option></arg>
   <arg choice="opt" rep="norepeat"><option>-f <replaceable>cmdfile</replaceable></option></arg>
   <arg choice="opt" rep="norepeat"><option>-k <replaceable>size</replaceable></option></arg>
   <arg choice="opt" rep="norepeat"><option>-m <replaceable>filename</replaceable></option></arg>
   <arg choice="opt" rep="norepeat"><option>-p <replaceable>addr</replaceable></option></arg>
   <arg choice="opt" rep="norepeat"><option>-q <replaceable>filename</replaceable></option></arg>
   <arg choice="opt" rep="norepeat"><option>-u <replaceable>auth</replaceable></option></arg>
   <arg choice="opt" rep="norepeat"><option>-v <replaceable>level</replaceable></option></arg>
   <arg choice="opt" rep="norepeat"><option>-xV</option></arg>
   <arg choice="opt" rep="norepeat">addr</arg>
  </cmdsynopsis>

 </refsynopsisdiv>
  
 <refsect1><title>DESCRIPTION</title>
  <para>
   <command moreinfo="none">yaz-client</command> is a Z39.50/SRU client (origin) with a
   simple command line interface that allows you to test behavior and
   performance of Z39.50 targets and SRU servers.
  </para>
  <para>
   If the <replaceable>addr</replaceable> is specified, the client creates
   a connection to the Z39.50/SRU target at the address given.
  </para>
  <para>
   When <command moreinfo="none">yaz-client</command> is started it tries to read
   commands from one of the following files:
   <itemizedlist>
    <listitem><para>
      Command file if it is given by option -f. 
     </para></listitem>
    <listitem><para>
      <filename moreinfo="none">.yazclientrc</filename> in current working directory.
     </para></listitem>
    <listitem><para>
      <filename moreinfo="none">.yazclientrc</filename> in the user's home directory.
      The value of the <literal moreinfo="none">HOME</literal> is used to determine
      the home directory. Normally, <literal moreinfo="none">HOME</literal> is only set
      on POSIX systems such as Linux, FreeBSD, Solaris.
     </para></listitem>
   </itemizedlist>
  </para>
 </refsect1>
  <refsect1>
   <title>OPTIONS</title>
   <variablelist>
    <varlistentry>
     <term>-a <replaceable>filename</replaceable></term>
     <listitem><para>
       If specified, logging of protocol packages will be appended
       file given. If <replaceable>filename</replaceable> is
       specified as <literal moreinfo="none">-</literal>, the output is written
       to <literal moreinfo="none">stdout</literal>.
      </para></listitem>
    </varlistentry>
    <varlistentry>
     <term>-b <replaceable>filename</replaceable></term>
     <listitem><para>
       If specified, YAZ will dump BER data in readable notation
       to the file specified. If <replaceable>filename</replaceable>
       is specified as <literal moreinfo="none">-</literal> the output is written
       to <literal moreinfo="none">stdout</literal>.
      </para></listitem>
    </varlistentry>
    <varlistentry>
     <term>-c <replaceable>filename</replaceable></term>
     <listitem><para>
       If specified, CCL configuration will be read from
       the file given.
      </para></listitem>
    </varlistentry>
    <varlistentry>
     <term>-d <replaceable>dump</replaceable></term>
     <listitem><para>
       If specified, YAZ will dump BER data for all PDUs sent and received 
       to individual files, named
       <replaceable>dump</replaceable>.DDD.<literal moreinfo="none">raw</literal>, 
       where DDD is 001, 002, 003, ..
      </para></listitem>
    </varlistentry>

    <varlistentry>
     <term>-f <replaceable>cmdfile</replaceable></term>
     <listitem><para>
      Reads commands from <replaceable>cmdfile</replaceable>. When
      this option is used, YAZ client does not read .yazclientrc
      from current directory or home directory.
      </para></listitem>
    </varlistentry>

    <varlistentry>
     <term>-k <replaceable>size</replaceable></term>
     <listitem><para>
      Sets preferred messages and maximum record size for Initialize
      Request in kilobytes. Default value is 1024 (1 MB).
      </para></listitem>
    </varlistentry>
    <varlistentry>
     <term>-m <replaceable>filename</replaceable></term>
     <listitem><para>
       If specified, retrieved records will be appended to the file given.
      </para></listitem>
    </varlistentry>
    <varlistentry>
     <term>-p <replaceable>addr</replaceable></term>
     <listitem><para>
       If specified, the client will use the proxy at the address
       given. YAZ client will
       connect to a proxy on the address and port given. 
       The actual target will be specified as part of the InitRequest
       to inform the proxy about actual target.
      </para></listitem>
    </varlistentry>
    <varlistentry>
     <term>-q <replaceable>filename</replaceable></term>
     <listitem><para>
       If specified, CQL configuration will be read from
       the file given.
      </para></listitem>
    </varlistentry>
    <varlistentry>
     <term>-u <replaceable>auth</replaceable></term>
     <listitem><para>
       If specified, the <replaceable>auth</replaceable> string
       will be used for authentication.
      </para></listitem>
    </varlistentry>
    <varlistentry><term>
      <literal moreinfo="none">-v</literal> <replaceable>level</replaceable>
     </term><listitem>
      <simpara>Sets the LOG level to <replaceable>level</replaceable>.
       Level is a sequence of tokens separated by comma. Each token
       is a integer or a named LOG item - one of 
       <literal moreinfo="none">fatal</literal>,
       <literal moreinfo="none">debug</literal>,
       <literal moreinfo="none">warn</literal>,
       <literal moreinfo="none">log</literal>,
       <literal moreinfo="none">malloc</literal>,
       <literal moreinfo="none">all</literal>,
       <literal moreinfo="none">none</literal>.
      </simpara></listitem>
    </varlistentry>
    <varlistentry>
     <term>-V</term>
     <listitem><para>
       Prints YAZ version.
     </para></listitem>
    </varlistentry>
    <varlistentry>
     <term>-x</term>
     <listitem><para>
       Makes the YAZ client print hex dumps of packages sent and received
       on standard output.
       </para></listitem>
    </varlistentry>
   </variablelist>
  </refsect1>
  <refsect1>
   <title>COMMANDS</title>
   <para>
    The YAZ client accepts the following commands.
   </para>
   <!-- 
   Commands for YAZ client.
   Included in both manual and man page for yaz-client.
-->
<variablelist>
 <varlistentry id="command-open"><term>
   <literal moreinfo="none">open </literal><replaceable>zurl</replaceable>
  </term>
  <listitem>
   <para>Opens a connection to a server. The syntax for
    <replaceable>zurl</replaceable> is the same as described
    above for connecting from the command line.
   </para>
   <para>
    Syntax:
   </para>
   <para>
    [<literal moreinfo="none">(tcp|ssl|unix|http)':'</literal>]<replaceable>host</replaceable>
    [:<replaceable>port</replaceable>][/<replaceable>base</replaceable>]
   </para>
  </listitem>
 </varlistentry>
 <varlistentry><term>
   <literal moreinfo="none">quit</literal>
  </term>
  <listitem>
   <para>Quits YAZ client</para>
  </listitem>
 </varlistentry>
 <varlistentry id="command-find"><term>
   <literal moreinfo="none">find </literal><replaceable>query</replaceable></term>
  <listitem>
   <para>Sends a Search Request using the <replaceable>query</replaceable>
    given. By default the query is assumed to be PQF. See command
    <link linkend="command-querytype">querytype</link> for more information.
   </para>
  </listitem>
 </varlistentry>
 <varlistentry><term>
   <literal moreinfo="none">delete</literal> <replaceable>setname</replaceable></term>
  <listitem>
   <para>Deletes result set with name <replaceable>setname</replaceable>
    on the server.</para>
  </listitem>
 </varlistentry>
 <varlistentry><term>
   <literal moreinfo="none">base </literal><replaceable>base1</replaceable>
   <replaceable>base2</replaceable> ...
  </term>
  <listitem>
   <para>Sets the name(s) of the database(s) to search. One or more
    databases may be specified separated by blanks. This commands overrides
    the database given in <replaceable>zurl</replaceable>.
   </para>
  </listitem>
 </varlistentry>
 <varlistentry><term>
   <literal moreinfo="none">show </literal>
   [<replaceable>start</replaceable>[+<replaceable>number</replaceable>]]
  </term>
  <listitem>
   <para>Fetches records by sending a Present Request from the start
    position given by
    <replaceable>start</replaceable>
    a number of records given by <replaceable>number</replaceable>. If
    <replaceable>start</replaceable> is not given, then the client
    will fetch from position of the last retrieved record plus 1. If
    <replaceable>number</replaceable> is not given, then one record will
    be fetched at a time.
   </para>
  </listitem>
 </varlistentry>
 <varlistentry><term>
   <literal moreinfo="none">scan</literal> <replaceable>term</replaceable>
  </term>
  <listitem>
   <simpara>Scans
    database index for a term. The syntax resembles the syntax
    for <link linkend="command-find"><literal moreinfo="none">find</literal></link>.
    If you want to scan for the word <literal moreinfo="none">water</literal> you could
    write
   </simpara>
   <screen format="linespecific">
    scan water
   </screen>
   <simpara>
    but if you want to scan only in, say the title field, you would write
   </simpara>
   <screen format="linespecific">
    scan @attr 1=4 water
   </screen>
  </listitem>
 </varlistentry>
 <varlistentry><term>
   <literal moreinfo="none">setscan</literal> <replaceable>set</replaceable> <replaceable>term</replaceable>
  </term>
  <listitem>
   <simpara>Scans database index for a term within a result set. This
    is similar to the scan command but has a result set as its first argument.
   </simpara>
  </listitem>
 </varlistentry>
 <varlistentry><term>
   <literal moreinfo="none">scanpos</literal> <replaceable>pos</replaceable>
  </term>
  <listitem>
   <simpara>
    Sets preferred position for scan. This value
    is used in next scan. By default position is 1.
   </simpara>
  </listitem>
 </varlistentry>
 <varlistentry><term>
   <literal moreinfo="none">scansize</literal> <replaceable>size</replaceable>
  </term>
  <listitem>
   <simpara>
    Sets number of entries to be returned by scan. Default
    number of entries is 20.
   </simpara>
  </listitem>
 </varlistentry>
 <varlistentry><term>
   <literal moreinfo="none">scanstep</literal> <replaceable>step</replaceable>
  </term>
  <listitem>
   <simpara>
    Set step-size for scan. This value is used in next scan
    sent to the target. By default step-size is 0.
   </simpara>
  </listitem>
 </varlistentry>
 <varlistentry id="sortspec"><term>
   <literal moreinfo="none">sort</literal> <replaceable>sortspecs</replaceable>
  </term>
  <listitem>
   <para>Sorts a result set. The sort command takes a
    sequence of space-separated sort specifications, with each sort
    specification consisting of two space-separated words (so that the
    whole specification list is made up of an even number of words).
    The first word of each specification
    holds a field (sort criterion) and the second holds flags.
    If the sort criterion includes <literal moreinfo="none">=</literal> it is assumed
    that the <literal moreinfo="none">SortKey</literal> is of type
    <literal moreinfo="none">sortAttributes</literal> using Bib-1: in this case
    the integer before <literal moreinfo="none">=</literal> is
    the attribute type and the integer following <literal moreinfo="none">=</literal>
    is the attribute value.
    If no <literal moreinfo="none">=</literal> is in the criterion it is treated as a
    sortfield of type InternationalString.
    The flags word of each sort specification must consist of
    <literal moreinfo="none">s</literal> 
    for case sensitive or <literal moreinfo="none">i</literal> for case insensitive, and
    <literal moreinfo="none">&lt;</literal> for ascending order or <literal moreinfo="none">&gt;</literal>
    for descending order.
   </para>
  </listitem>
 </varlistentry>
 <varlistentry><term>
   <literal moreinfo="none">sort+</literal>
  </term>
  <listitem>
   <para>Same as <literal moreinfo="none">sort</literal> but stores the sorted
    result set in a new result set.
   </para>
  </listitem>
 </varlistentry>
 <varlistentry><term>
   <literal moreinfo="none">authentication</literal> <replaceable>openauth</replaceable>
  </term>
  <listitem>
   <para>Sets up a authentication string if a server requires
    authentication (v2 OpenStyle). The authentication string is first
    sent to the server when the 
    <link linkend="command-open"><literal moreinfo="none">open</literal></link> command is
    issued and the Z39.50 Initialize Request is sent, so this command
    must be used before <literal moreinfo="none">open</literal> in order to be effective.
    A common convention for the <replaceable>authopen</replaceable> string
    is that the username - and password is separated by a slash, e.g.
    <literal moreinfo="none">myusername/mysecret</literal>.
   </para>
  </listitem>
 </varlistentry>

 <varlistentry><term>
   <literal moreinfo="none">sru</literal> <replaceable>method</replaceable> <replaceable>version</replaceable>
  </term>
  <listitem>
   <para>Selects SRU method and version.
    Must be one of <literal moreinfo="none">POST</literal>,
    <literal moreinfo="none">GET</literal>, <literal moreinfo="none">SOAP</literal> (default). Version
    should be either 1.1 or 1.2. Other versions are allowed - for testing
    purposes (version negotiation with SRU server).
   </para>
  </listitem>
 </varlistentry>

 <varlistentry><term>
   <literal moreinfo="none">list_all</literal>
  </term>
  <listitem>
   <para>This command displays status and values for many settings.
   </para>
  </listitem>
 </varlistentry>
 
 <varlistentry><term>
   <literal moreinfo="none">lslb</literal> <replaceable>n</replaceable>
  </term>
  <listitem>
   <para>Sets the limit for when no records should be returned
    together with the search result.
    See the
    <ulink url="http://www.loc.gov/z3950/agency/markup/04.html#3.2.2.1.6">
     Z39.50 standard
    </ulink>
    for more details.
   </para>
  </listitem>
 </varlistentry>

 <varlistentry><term>
   <literal moreinfo="none">ssub</literal> <replaceable>n</replaceable>
  </term>
  <listitem>
   <para>Sets the limit for when all records should be returned with
    the search result.
    See the
    <ulink url="http://www.loc.gov/z3950/agency/markup/04.html#3.2.2.1.6">
     Z39.50 standard
    </ulink> for more details.
   </para>
  </listitem>
 </varlistentry>
 
 <varlistentry><term>
   <literal moreinfo="none">mspn</literal> <replaceable>n</replaceable>
  </term>
  <listitem>
   <para>Sets the number of records should be returned if the
    number of records in the result set is between the values of
    <literal moreinfo="none">lslb</literal> and <literal moreinfo="none">ssub</literal>.
    See the
    <ulink url="http://www.loc.gov/z3950/agency/markup/04.html#3.2.2.1.6">
     Z39.50 standard
    </ulink>
    for more details.
   </para>
  </listitem>
 </varlistentry>
 <varlistentry><term>
   <literal moreinfo="none">status</literal>
  </term>
  <listitem>
   <para>Displays the values of <literal moreinfo="none">lslb</literal>,
    <literal moreinfo="none">ssub</literal> and <literal moreinfo="none">mspn</literal>.
   </para>
  </listitem>
 </varlistentry>
 <varlistentry><term>
   <literal moreinfo="none">setname</literal>
  </term>
  <listitem>
   <para>Switches named result sets on and off. Default is on.
   </para>
  </listitem>
 </varlistentry>
 <varlistentry><term>
   <literal moreinfo="none">cancel</literal>
  </term>
  <listitem>
   <para>Sends a Trigger Resource Control Request to the target.
   </para>
  </listitem>
 </varlistentry>
 <varlistentry><term>
   <literal moreinfo="none">format</literal> <replaceable>oid</replaceable>
  </term>
  <listitem>
   <para>Sets the preferred transfer syntax for retrieved records.
    yaz-client supports all the record syntaxes that currently
    are registered. See
    <ulink url="http://www.loc.gov/z3950/agency/defns/oids.html#5">
     Z39.50 Standard
    </ulink>
    for more details. Commonly used records syntaxes include usmarc,
    sutrs, grs1 and xml.
   </para>
  </listitem>
 </varlistentry>
 <varlistentry><term>
   <literal moreinfo="none">elements</literal> <replaceable>e</replaceable>
  </term>
  <listitem>
   <para>Sets the element set name for the records. Many targets support
    element sets are B (for brief) and F (for full).
   </para>
  </listitem>
 </varlistentry>
 <varlistentry><term>
   <literal moreinfo="none">close</literal>
  </term>
  <listitem>
   <para>Sends a Z39.50 Close APDU and closes connection with the peer
   </para>
  </listitem>
 </varlistentry>
 <varlistentry id="command-querytype"><term>
   <literal moreinfo="none">querytype</literal> <replaceable>type</replaceable>
  </term>
  <listitem>
   <para>Sets the query type as used by command 
   <link linkend="command-find"><literal moreinfo="none">find</literal></link>.
    The following is supported:
    <literal moreinfo="none">prefix</literal> for
	<link linkend="PQF">Prefix Query Notation</link> (Type-1 Query);
    <literal moreinfo="none">ccl</literal> for CCL search (Type-2 Query),
    <literal moreinfo="none">cql</literal> for CQL (Type-104 search with CQL OID),
    <literal moreinfo="none">ccl2rpn</literal> for
	<link linkend="CCL">CCL</link> to RPN conversion (Type-1 Query).
    <literal moreinfo="none">cql2rpn</literal> for
	CQL to RPN conversion (Type-1 Query).
   </para>
  </listitem>
 </varlistentry>
 <varlistentry><term>
   <literal moreinfo="none">attributeset</literal> <replaceable>set</replaceable>
  </term>
  <listitem>
   <para>
    Sets attribute set OID for prefix queries (RPN, Type-1).
   </para>
  </listitem>
 </varlistentry>
 <varlistentry><term>
   <literal moreinfo="none">refid</literal> <replaceable>id</replaceable>
  </term>
  <listitem>
   <para>Sets reference ID for Z39.50 Request(s).
   </para>
  </listitem>
 </varlistentry>
 <varlistentry><term>
   <literal moreinfo="none">itemorder</literal>
   <replaceable>type</replaceable> <replaceable>no</replaceable>
  </term>
  <listitem>
   <para>Sends an Item Order Request using the ILL External. 
    <replaceable>type</replaceable> is either 1 or 2 which corresponds to
    ILL-Profile 1 and 2 respectively. The <replaceable>no</replaceable>
    is the Result Set position of the record to be ordered.
   </para>
  </listitem>
 </varlistentry>
 <varlistentry><term>
   <literal moreinfo="none">update</literal>
   <replaceable>action</replaceable>
   <replaceable>recid</replaceable>
   <replaceable>doc</replaceable>
  </term>
  <listitem>
   <para>Sends Item Update Request. The <replaceable>action</replaceable>
    argument must be the action type: one of <literal moreinfo="none">insert</literal>,
    <literal moreinfo="none">replace</literal>, <literal moreinfo="none">delete</literal> and
    <literal moreinfo="none">update</literal>. The second argument, 
    <replaceable>recid</replaceable>, is the
    record identifier (any string). Third argument which is optional is
    the record document for the request. If doc is a quoted string
    (double quotes) the string content is used verbatim. If doc is not
    a quoted string, it is assumed to be a filename which is read, then
    sent as the docuemnt content. If doc is omitted, the last received
    record (as parf of present response or piggybacked search response) 
    is used for the update.
   </para>
  </listitem>
 </varlistentry>

 <varlistentry><term>
   <literal moreinfo="none">source</literal>
   <replaceable>filename</replaceable>
  </term>
  <listitem>
   <para>Executes list of commands from
    file <replaceable>filename</replaceable>, just like source on
    most UNIX shells. A single dot (<literal moreinfo="none">.</literal>) can be used
    as an alternative.
   </para>
  </listitem>
 </varlistentry>

 <varlistentry><term>
   <literal moreinfo="none">!</literal>
   <replaceable>args</replaceable>
  </term>
  <listitem>
   <para>Executes command <replaceable>args</replaceable> in subshell
    using the <literal moreinfo="none">system</literal> call.
   </para>
  </listitem>
 </varlistentry>

 <varlistentry><term>
   <literal moreinfo="none">push_command</literal>
   <replaceable>command</replaceable>
  </term>
  <listitem>
   <para>The push_command takes another command as its argument.
    That command is then added to the history information (so
    you can retrieve it later). The command itself is not
    executed. This command only works if you have GNU readline/history
    enabled.
   </para>
  </listitem>
 </varlistentry>

 <varlistentry><term>
   <literal moreinfo="none">set_apdufile</literal>
   <replaceable>filename</replaceable>
  </term>
  <listitem>
   <para>Sets that APDU should be logged to file
    <replaceable>filename</replaceable>. Another way to achieve
    APDU log is by using command-line option <literal moreinfo="none">-a</literal>.
   </para>
  </listitem>
 </varlistentry>

 <varlistentry><term>
   <literal moreinfo="none">set_auto_reconnect</literal>
   <replaceable>flag</replaceable>
  </term>
  <listitem>
   <para>Specifies whether YAZ client automatically reconnect if
    target closes connection (Z39.50 only).
   </para>
   <para>
    <replaceable>flag</replaceable> must be either
    <literal moreinfo="none">on</literal> or <literal moreinfo="none">off</literal>.
   </para>
  </listitem>
 </varlistentry>

 <varlistentry id="command-set-auto-wait"><term>
   <literal moreinfo="none">set_auto_wait</literal>
   <replaceable>flag</replaceable>
  </term>
  <listitem>
   <para>Specifies whether YAZ client should wait for
   response protocol packages after a request.
   By default YAZ client waits (on) for response packages immediately
   after a command (find, show) has been issued. If <literal moreinfo="none">off</literal>
   is used, YAZ client does not attempt to receive packages automatically.
   These will have to be manually received when command 
   <link linkend="command-wait-response">
    <literal moreinfo="none">wait_response</literal>
   </link> is used.
   </para>
   <para>
   <replaceable>flag</replaceable> must be either
   <literal moreinfo="none">on</literal> or <literal moreinfo="none">off</literal>.
   </para>
  </listitem>
 </varlistentry>

 <varlistentry><term>
   <literal moreinfo="none">set_marcdump</literal>
   <replaceable>filename</replaceable>
  </term>
  <listitem>
   <para>Specifies that all retrieved records should be appended to
    file <replaceable>filename</replaceable>. This command does the
    thing as option <literal moreinfo="none">-m</literal>.
   </para>
  </listitem>
 </varlistentry>

 <varlistentry><term>
   <literal moreinfo="none">schema</literal>
   <replaceable>schemaid</replaceable>
  </term>
  <listitem>
   <para>Specifies schema for retrieval.
    Schema may be specified as an OID for Z39.50.
    For SRU, schema is a simple string URI.
   </para>
  </listitem>
 </varlistentry>

 <varlistentry id="command-charset"><term>
   <literal moreinfo="none">charset</literal>
   <replaceable>negotiationcharset</replaceable>
   [<replaceable>displaycharset</replaceable>]
   [[<replaceable>marccharset</replaceable>]]
  </term>
  <listitem>
   <para>Specifies character set (encoding) for Z39.50
    negotiation / SRU encoding and/or character set for output (terminal).
   </para>
   <para>
    <replaceable>negotiationcharset</replaceable> is the name
    of the character set to be negotiated by the server. The special name
    <literal moreinfo="none">-</literal> for <replaceable>negotiationcharset</replaceable>
    specifies <emphasis>no</emphasis> character set to be negotiated.
   </para>
   <para>
    If <replaceable>displaycharset</replaceable> is given, it specifies name
    of the character set of the output (on the terminal on which
    YAZ client is running). To disable conversion of characters
    to the output encoding, the special name <literal moreinfo="none">-</literal> (dash)
    can be used.
    If the special name <literal moreinfo="none">auto</literal> is given, YAZ client will
    convert strings to the encoding of the
    terminal as returned by <function moreinfo="none">nl_langinfo</function> call.
   </para>
   <para>
    If <replaceable>marcharset</replaceable> is given, it specifies name
    of the character set of retrieved MARC records from server. See
    also <literal moreinfo="none">marcharset</literal> command.
   </para>
   <note>
    <para>
     Since character set negotation takes effect in the Z39.50
     Initialize Request you should issue this command before
     command <link linkend="command-open"><literal moreinfo="none">open</literal></link>
     is used.
    </para>
   </note>
   <note>
    <para>
     MARC records are not covered by Z39.50 character set negotiation,
     so that's why there is a separate character that must be known
     in order to do meaningful converson(s).
    </para>
   </note>
  </listitem>
 </varlistentry>

 <varlistentry><term>
   <literal moreinfo="none">negcharset</literal>
   <replaceable>charset</replaceable>
  </term>
  <listitem>
   <para>Specifies character set for negotiation (Z39.50). The
    argument is the same as second argument for command
    <link linkend="command-charset"><literal moreinfo="none">charset</literal></link>.
   </para>
  </listitem>
 </varlistentry>

 <varlistentry><term>
   <literal moreinfo="none">displaycharset</literal>
   <replaceable>charset</replaceable>
  </term>
  <listitem>
   <para>Specifies character set for output (display). The
    argument is the same as second argument for command 
    <link linkend="command-charset"><literal moreinfo="none">charset</literal></link>.
   </para>
  </listitem>
 </varlistentry>

 <varlistentry><term>
   <literal moreinfo="none">marccharset</literal>
   <replaceable>charset</replaceable>
  </term>
  <listitem>
   <para>Specifies character set for retrieved MARC records so
    that YAZ client can display them in a character suitable
    for your display. See <literal moreinfo="none">charset</literal> command.
    If <literal moreinfo="none">auto</literal> is given, YAZ will assume
    that MARC21/USMARC is using MARC8/UTF8 and ISO-8859-1
    for all other MARC variants. The charset argument is the
    same as third argument for command
    <link linkend="command-charset"><literal moreinfo="none">charset</literal></link>.
   </para>
  </listitem>
 </varlistentry>

 <varlistentry><term>
   <literal moreinfo="none">querycharset</literal>
   <replaceable>charset</replaceable>
  </term>
  <listitem>
   <para>Specifies character set for query terms for Z39.50 RPN
    queries and Z39.50 Scan Requests (termListAndStartPoint).
    This is a pure client-side conversion which converts from
    displayCharset to queryCharset.
   </para>
  </listitem>
 </varlistentry>
 
 <varlistentry><term>
   <literal moreinfo="none">set_cclfile</literal>
   <replaceable>filename</replaceable>
  </term>
  <listitem>
   <para>Specifies that CCL fields should be read from file
    file <replaceable>filename</replaceable>. This command does the
    thing as option <literal moreinfo="none">-c</literal>.
   </para>
  </listitem>
 </varlistentry>

 <varlistentry><term>
   <literal moreinfo="none">set_cqlfile</literal>
   <replaceable>filename</replaceable>
  </term>
  <listitem>
   <para>Specifies that CQL fields should be read from file
    file <replaceable>filename</replaceable>. This command does the
    thing as option <literal moreinfo="none">-q</literal>.
   </para>
  </listitem>
 </varlistentry>

 <varlistentry><term>
   <literal moreinfo="none">register_oid</literal>
   <replaceable>name</replaceable>
   <replaceable>class</replaceable>
   <replaceable>OID</replaceable>
  </term>
  <listitem>
   <para>This command allows you to register your own object
    identifier - so that instead of entering a long dot-notation
    you can use a short name instead.
    The <replaceable>name</replaceable> is your
    name for the OID, <replaceable>class</replaceable> is the
    class, and <replaceable>OID</replaceable> is the raw OID in
    dot notation. Class is one <literal moreinfo="none">appctx</literal>,
    <literal moreinfo="none">absyn</literal>, <literal moreinfo="none">attet</literal>,
    <literal moreinfo="none">transyn</literal>, <literal moreinfo="none">diagset</literal>,
    <literal moreinfo="none">recsyn</literal>, <literal moreinfo="none">resform</literal>,
    <literal moreinfo="none">accform</literal>, <literal moreinfo="none">extserv</literal>,
    <literal moreinfo="none">userinfo</literal>, <literal moreinfo="none">elemspec</literal>,
    <literal moreinfo="none">varset</literal>, <literal moreinfo="none">schema</literal>,
    <literal moreinfo="none">tagset</literal>, <literal moreinfo="none">general</literal>.
    If you're in doubt use the <literal moreinfo="none">general</literal>
    class.
   </para>
  </listitem>
 </varlistentry>

 <varlistentry><term>
   <literal moreinfo="none">register_tab</literal>
   <replaceable>command</replaceable>
   <replaceable>string</replaceable>
  </term>
  <listitem>
   <para>This command registers a TAB completion string for
    the command given.
   </para>
  </listitem>
 </varlistentry>

 <varlistentry><term>
   <literal moreinfo="none">sleep</literal>
   <replaceable>seconds</replaceable>
  </term>
  <listitem>
   <para>This command makes YAZ client sleep (be idle) for
    the number of seconds given.
   </para>
  </listitem>
 </varlistentry>

 <varlistentry id="command-wait-response"><term>
   <literal moreinfo="none">wait_response</literal>
   [ <replaceable>number</replaceable>]
  </term>
  <listitem>
   <para>This command makes YAZ client wait for a number of
    response packages from target. If <replaceable>number</replaceable> is
    omitted, 1 is assumed. 
   </para>
   <para>This command is rarely used and is only useful if command
    <link linkend="command-set-auto-wait">
     <literal moreinfo="none">set_auto_wait</literal>
    </link> is set to off.
   </para>
  </listitem>
 </varlistentry>

 <varlistentry id="command-xmles"><term>
   <literal moreinfo="none">xmles</literal>
   <replaceable>OID</replaceable>
   <replaceable>doc</replaceable>
  </term>
  <listitem>
   <para>Sends XML Extended Services request using the OID and doc given.
   </para>
  </listitem>
 </varlistentry>

 <varlistentry><term>
   <literal moreinfo="none">zversion</literal>
   <replaceable>ver</replaceable>
  </term>
  <listitem>
   <para>This command sets Z39.50 version for negotiation. 
    Should be used before 
    <link linkend="command-open"><literal moreinfo="none">open</literal></link>.
    By default 3 (version 3) is used.
   </para>
  </listitem>
 </varlistentry>

 <varlistentry><term>
   <literal moreinfo="none">options</literal>
   <replaceable>op1 op2..</replaceable>
  </term>
  <listitem>
   <para>This command sets Z39.50 options for negotiation. 
    Should be used before 
   <link linkend="command-open"><literal moreinfo="none">open</literal></link>.
   </para>
   <para>
    The following options are supported:
    <literal moreinfo="none">search</literal>,  
    <literal moreinfo="none">present</literal>,  
    <literal moreinfo="none">delSet</literal>,  
    <literal moreinfo="none">resourceReport</literal>,  
    <literal moreinfo="none">triggerResourceCtrl</literal>,  
    <literal moreinfo="none">resourceCtrl</literal>,  
    <literal moreinfo="none">accessCtrl</literal>,  
    <literal moreinfo="none">scan</literal>,  
    <literal moreinfo="none">sort</literal>,  
    <literal moreinfo="none">extendedServices</literal>,  
    <literal moreinfo="none">level_1Segmentation</literal>,  
    <literal moreinfo="none">level_2Segmentation</literal>,  
    <literal moreinfo="none">concurrentOperations</literal>,  
    <literal moreinfo="none">namedResultSets</literal>,  
    <literal moreinfo="none">encapsulation</literal>,  
    <literal moreinfo="none">resultCount</literal>,  
    <literal moreinfo="none">negotiationModel</literal>,  
    <literal moreinfo="none">duplicationDetection</literal>,  
    <literal moreinfo="none">queryType104</literal>,  
    <literal moreinfo="none">pQESCorrection</literal>,  
    <literal moreinfo="none">stringSchema</literal>.
   </para>
  </listitem>
 </varlistentry>
 
</variablelist>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
sgml-parent-document: "yaz.xml"
sgml-local-catalogs: nil
sgml-namecase-general:t
End:
-->

   </refsect1>
 <refsect1><title>EXAMPLE</title>
  <para>
   The simplest example of a Prefix Query would be something like
   <screen format="linespecific">
    f knuth
   </screen>
   or
   <screen format="linespecific">
    f "donald knuth"
   </screen>
   In those queries no attributes was specified.
   This leaves it up to the server what fields to search but
   most servers will search in all fields. Some servers does not
   support this feature though, and require that some attributes
   are defined. To add one attribute you could do:
   <screen format="linespecific">
    f @attr 1=4 computer
   </screen>
   where we search in the title field, since the use(1) is title(4).
   If we want to search in the author field <emphasis>and</emphasis>
   in the title field, and in the title field using right truncation
   it could look something like this:
   <screen format="linespecific">
    f @and @attr 1=1003 knuth @attr 1=4 @attr 5=1 computer
   </screen>
   Finally using a mix of Bib-1 and GILS attributes could look
   something like this:
   <screen format="linespecific">
    f @attrset Bib-1 @and @attr GILS 1=2008 Washington @attr 1=21 weather
   </screen>
  </para>
 </refsect1>
  <refsect1><title>FILES</title>
   <para>
    <filename moreinfo="none">yaz-&lt;version&gt;/client/client.c</filename>
   </para>
   <para>
    <filename moreinfo="none">$HOME/.yazclientrc</filename>
   </para>
   <para>
    <filename moreinfo="none">$HOME/.yazclient.history</filename>
   </para>
  </refsect1>
  <refsect1><title>SEE ALSO</title>
   <para>
    <citerefentry>
     <refentrytitle>yaz</refentrytitle>
     <manvolnum>7</manvolnum>
    </citerefentry>
   </para>
  </refsect1>
</refentry>
<!--Generated by stripref.xsl . Do not edit-->
<refentry id="yaz-ztest">
 <refentryinfo>
  <productname class="trade">YAZ</productname>
  <productnumber>3.0.28</productnumber>
 </refentryinfo>
 
 <refmeta>
  <refentrytitle>yaz-ztest</refentrytitle>
  <manvolnum>8</manvolnum>
 </refmeta>
 
 <refnamediv>
  <refname>yaz-ztest</refname>
  <refpurpose>Z39.50 Test Server</refpurpose>
 </refnamediv>
 
 <refsynopsisdiv>
  <!-- 
   cmd description of YAZ GFS application.
   Included in both manual and man page for yaz-ztest
-->

<cmdsynopsis sepchar=" ">
 <command moreinfo="none">application</command>
 <arg choice="opt" rep="norepeat"><option>-install</option></arg>
 <arg choice="opt" rep="norepeat"><option>-installa</option></arg>
 <arg choice="opt" rep="norepeat"><option>-remove</option></arg>
 <arg choice="opt" rep="norepeat"><option>-a <replaceable>file</replaceable></option></arg>
 <arg choice="opt" rep="norepeat"><option>-v <replaceable>level</replaceable></option></arg>
 <arg choice="opt" rep="norepeat"><option>-l <replaceable>file</replaceable></option></arg>
 <arg choice="opt" rep="norepeat"><option>-u <replaceable>uid</replaceable></option></arg>
 <arg choice="opt" rep="norepeat"><option>-c <replaceable>config</replaceable></option></arg>
 <arg choice="opt" rep="norepeat"><option>-f <replaceable>vconfig</replaceable></option></arg>
 <arg choice="opt" rep="norepeat"><option>-C <replaceable>fname</replaceable></option></arg>
 <arg choice="opt" rep="norepeat"><option>-t <replaceable>minutes</replaceable></option></arg>
 <arg choice="opt" rep="norepeat"><option>-k <replaceable>kilobytes</replaceable></option></arg>
 <arg choice="opt" rep="norepeat"><option>-d <replaceable>daemon</replaceable></option></arg>
 <arg choice="opt" rep="norepeat"><option>-w <replaceable>dir</replaceable></option></arg>
 <arg choice="opt" rep="norepeat"><option>-p <replaceable>pidfile</replaceable></option></arg>
 <arg choice="opt" rep="norepeat"><option>-r <replaceable>kilobytes</replaceable></option></arg>
 <arg choice="opt" rep="norepeat"><option>-ziDST1</option></arg>
 <arg choice="opt" rep="repeat">listener-spec</arg>
</cmdsynopsis>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
sgml-parent-document: "yaz.xml"
sgml-local-catalogs: nil
sgml-namecase-general:t
End:
-->

 </refsynopsisdiv>
 <refsect1><title>DESCRIPTION</title>
  <para>
   <command moreinfo="none">yaz-ztest</command> is a Z39.50 test server that uses
   the YAZ generic frontend server API.
   The server acts as a real Z39.50 server but does not use a database.
   It returns a random hit count and returns a subset of a few built-in
   records.
  </para>
  <para>
   The <replaceable>listener-spec</replaceable> consists of a transport
   mode followed by a colon, followed by a listener address. The
   transport mode is either <literal moreinfo="none">tcp</literal>, <literal moreinfo="none">unix</literal>,
   or <literal moreinfo="none">ssl</literal>.
  </para>
  <para>
   For TCP and SSL, an address has the form:
   <screen format="linespecific">
    hostname | IP-number [ : portnumber ]
   </screen>
  </para>
  <para>
   For UNIX local socket the address is the filename of the local socket.
  </para>
 </refsect1>
 <refsect1>
  <title>OPTIONS</title>
  <!-- 
   Options for generic frontend server and yaz-ztest.
   Included in both manual and man page for yaz-ztest
-->

<variablelist>
 
 <varlistentry><term><literal moreinfo="none">-a </literal>
   <replaceable>file</replaceable></term>
  <listitem><para>
    Specify a file for dumping PDUs (for diagnostic purposes).
    The special name <literal moreinfo="none">-</literal> (dash) sends output to
    <literal moreinfo="none">stderr</literal>.
   </para></listitem></varlistentry>
 
 <varlistentry><term><literal moreinfo="none">-S</literal></term>
  <listitem><para>
    Don't fork or make threads on connection requests. This is good for
    debugging, but not recommended for real operation: Although the
    server is asynchronous and non-blocking, it can be nice to keep
    a software malfunction (okay then, a crash) from affecting all
    current users.
   </para></listitem></varlistentry>
 
 <varlistentry><term><literal moreinfo="none">-1</literal></term>
  <listitem><para>
    Like <literal moreinfo="none">-S</literal> but after one session the server
    exits. This mode is for debugging <emphasis>only</emphasis>.
   </para></listitem></varlistentry>
 
 <varlistentry><term><literal moreinfo="none">-T</literal></term>
  <listitem><para>
    Operate the server in threaded mode. The server creates a thread
    for each connection rather than a fork a process. Only available
    on UNIX systems that offers POSIX threads.
   </para></listitem></varlistentry>

 <varlistentry><term><literal moreinfo="none">-s</literal></term>
  <listitem><para>
    Use the SR protocol (obsolete).
   </para></listitem></varlistentry>

 <varlistentry><term><literal moreinfo="none">-z</literal></term>
  <listitem><para>
    Use the Z39.50 protocol (default). This option and <literal moreinfo="none">-s</literal>
    complement each other.
    You can use both multiple times on the same command
    line, between listener-specifications (see below). This way, you
    can set up the server to listen for connections in both protocols
    concurrently, on different local ports.
   </para></listitem></varlistentry>

 <varlistentry><term><literal moreinfo="none">-l </literal>
   <replaceable>file</replaceable></term>
  <listitem><para>The logfile.
   </para></listitem></varlistentry>

 <varlistentry><term><literal moreinfo="none">-c </literal>
   <replaceable>config</replaceable></term>
  <listitem><para>A user option that serves as a specifier for some
    sort of configuration, usually a filename.
    The argument to this option is transferred to member
    <literal moreinfo="none">configname</literal> of the
    <literal moreinfo="none">statserv_options_block</literal>.
   </para></listitem></varlistentry>

 <varlistentry><term><literal moreinfo="none">-f </literal>
   <replaceable>vconfig</replaceable></term>
  <listitem><para>This specifies an XML file that describes
    one or more YAZ frontend virtual servers.
   </para></listitem></varlistentry>

 <varlistentry><term><literal moreinfo="none">-C </literal>
   <replaceable>fname</replaceable></term>
  <listitem><para>Sets SSL certificate file name for server (PEM).
   </para></listitem></varlistentry>

 <varlistentry><term><literal moreinfo="none">-v </literal>
   <replaceable>level</replaceable></term>
  <listitem><para>
    The log level. Use a comma-separated list of members of the set
    {fatal,debug,warn,log,malloc,all,none}.
   </para></listitem></varlistentry>

 <varlistentry><term><literal moreinfo="none">-u </literal>
   <replaceable>uid</replaceable></term>
  <listitem><para>
    Set user ID. Sets the real UID of the server process to that of the
    given user. It's useful if you aren't comfortable with having the
    server run as root, but you need to start it as such to bind a
    privileged port.
   </para></listitem></varlistentry>

 <varlistentry><term><literal moreinfo="none">-w </literal>
   <replaceable>dir</replaceable></term>
  <listitem><para>
    The server changes to this directory during before listening 
    on incoming connections. This option is useful
    when the server is operating from the <application moreinfo="none">inetd</application>
    daemon (see <literal moreinfo="none">-i</literal>).
   </para></listitem></varlistentry>

 <varlistentry><term><literal moreinfo="none">-p </literal>
   <replaceable>pidfile</replaceable></term>
  <listitem><para>
    Specifies that the server should write its Process ID to
    file given by <replaceable>pidfile</replaceable>. 
    A typical location would be <filename moreinfo="none">/var/run/yaz-ztest.pid</filename>.
   </para></listitem></varlistentry>

 <varlistentry><term><literal moreinfo="none">-i</literal></term>
  <listitem><para>
    Use this to make the the server run from the
    <application moreinfo="none">inetd</application> server (UNIX only).
   </para></listitem></varlistentry>
 
 <varlistentry><term><literal moreinfo="none">-D</literal></term>
  <listitem><para>
    Use this to make the server put itself in the background and
    run as a daemon. If neither <literal moreinfo="none">-i</literal> nor 
    <literal moreinfo="none">-D</literal> is given, the server starts in the foreground.
   </para></listitem></varlistentry>
 
 <varlistentry><term><literal moreinfo="none">-install</literal></term>
  <listitem><para>
    Use this to install the server as an NT service
    (Windows NT/2000/XP only). 
    Control the server by going to the Services in the Control Panel.
   </para></listitem></varlistentry>
 
 <varlistentry><term><literal moreinfo="none">-installa</literal></term>
  <listitem><para>
    Use this to install and activate the server as an NT service
    (Windows NT/2000/XP only). 
    Control the server by going to the Services in the Control Panel.
   </para></listitem></varlistentry>
 
 <varlistentry><term><literal moreinfo="none">-remove</literal></term>
  <listitem><para>
    Use this to remove the server from the NT services
    (Windows NT/2000/XP only). 
   </para></listitem></varlistentry>
 
 <varlistentry><term><literal moreinfo="none">-t </literal>
   <replaceable>minutes</replaceable></term>
  <listitem><para>
    Idle session timeout, in minutes.
   </para></listitem></varlistentry>
 
 <varlistentry><term><literal moreinfo="none">-k </literal>
   <replaceable>size</replaceable></term>
  <listitem><para>
    Maximum record size/message size, in kilobytes.
   </para></listitem>
 </varlistentry>

 <varlistentry><term><literal moreinfo="none">-r </literal>
   <replaceable>size</replaceable></term>
  <listitem><para>
    Maximum size of log file before rotation occurs, in kilobytes.
    Default size is 1048576 k (=1 GB).
   </para></listitem>
 </varlistentry>

 <varlistentry><term><literal moreinfo="none">-d </literal>
   <replaceable>daemon</replaceable></term>
  <listitem><para>
    Set name of daemon to be used in hosts access file.
    See
    <citerefentry>
     <refentrytitle>hosts_access</refentrytitle>
     <manvolnum>5</manvolnum>
    </citerefentry>
    and 
    <citerefentry>
     <refentrytitle>tcpd</refentrytitle>
     <manvolnum>8</manvolnum>
    </citerefentry>.
   </para></listitem>
 </varlistentry>

 <varlistentry><term><literal moreinfo="none">-m </literal>
   <replaceable>time-format</replaceable></term>
  <listitem><para>
   Sets the format of time-stamps in the log-file. Specify a string in
   the input format to <literal moreinfo="none">strftime()</literal>.
   </para></listitem>
 </varlistentry>
 
</variablelist>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
sgml-parent-document: "yaz.xml"
sgml-local-catalogs: nil
sgml-namecase-general:t
End:
-->

 </refsect1>
 <refsect1><title>GFS CONFIGURATION AND VIRTUAL HOSTS</title>
  <!-- 
   Description of the virtual host mechanism in YAZ GFS
   Included in both manual and man page for yaz-ztest
-->

<para>
 The Virtual hosts mechanism allows a YAZ frontend server to
 support multiple backends. A backend is selected on the basis of
 the TCP/IP binding (port+listening adddress) and/or the virtual host.
</para>
<para>
 A backend can be configured to execute in a particular working
 directory. Or the YAZ frontend may perform CQL to RPN conversion, thus
 allowing traditional Z39.50 backends to be offered as a SRW/SRU
 service. SRW/SRU Explain information for a particular backend may also
 be specified.
</para>
<para>
 For the HTTP protocol, the virtual host is specified in the Host header.
 For the Z39.50 protocol, the virtual host is specified as in the
 Initialize Request in the OtherInfo, OID 1.2.840.10003.10.1000.81.1.
</para>
<note>
 <para>
  Not all Z39.50 clients allows the VHOST information to be set.
  For those the selection of the backend must rely on the
  TCP/IP information alone (port and address).
 </para>
</note>
<para>
 The YAZ frontend server uses XML to describe the backend
 configurations. Command-line option <literal moreinfo="none">-f</literal> 
 specifies filename of the XML configuration.
</para>
<para>
 The configuration uses the root element <literal moreinfo="none">yazgfs</literal>.
 This element includes a list of <literal moreinfo="none">listen</literal> elements,
 followed by one or more <literal moreinfo="none">server</literal> elements.
</para>
<para>
 The <literal moreinfo="none">listen</literal> describes listener (transport end point),
 such as TCP/IP, Unix file socket or SSL server. Content for 
 a listener:
 <variablelist>
  <varlistentry><term>CDATA (required)</term>
   <listitem>
    <para>
     The CDATA for the <literal moreinfo="none">listen</literal> element holds the
     listener string, such as <literal moreinfo="none">tcp:@:210</literal>, 
     <literal moreinfo="none">tcp:server1:2100</literal>,
     etc.
    </para>
   </listitem>
  </varlistentry>
  <varlistentry><term>attribute <literal moreinfo="none">id</literal> (optional)</term>
    <listitem>
     <para>
      identifier for this listener. This may be referred to from
      server sections.
     </para>
    </listitem>
   </varlistentry>
 </variablelist>
 <note>
  <para>
   We expect more information to be added for the listen section in
   a future version, such as CERT file for SSL servers.
  </para>
 </note>
</para>
<para>
 The <literal moreinfo="none">server</literal> describes a server and the parameters
 for this server type. Content for a server:
 <variablelist>
  <varlistentry><term>attribute <literal moreinfo="none">id</literal> (optional)</term>
   <listitem>
    <para>
     Identifier for this server. Currently not used for anything,
     but it might be for logging purposes.
   </para>
   </listitem>
  </varlistentry>

  <varlistentry><term>attribute <literal moreinfo="none">listenref</literal> (optional)</term>
   <listitem>
    <para>
     Specifies listener for this server. If this attribute is not
     given, the server is accessible from all listener. In order
     for the server to be used for real, howeever, the virtual host
     must match (if specified in the configuration).
    </para>
   </listitem>
  </varlistentry>

  <varlistentry><term>element <literal moreinfo="none">config</literal> (optional)</term>
   <listitem>
    <para>
     Specifies the server configuration. This is equivalent
     to the config specified using command line option
     <literal moreinfo="none">-c</literal>.
    </para>
   </listitem>
  </varlistentry>

  <varlistentry><term>element <literal moreinfo="none">directory</literal> (optional)</term>
   <listitem>
    <para>
     Specifies a working directory for this backend server. If
     specifid, the YAZ fronend changes current working directory
     to this directory whenever a backend of this type is
     started (backend handler bend_start), stopped (backend handler hand_stop)
     and initialized (bend_init).
    </para>
   </listitem>
  </varlistentry>

  <varlistentry><term>element <literal moreinfo="none">host</literal> (optional)</term>
   <listitem>
    <para>
     Specifies the virtual host for this server. If this is specified
     a client <emphasis>must</emphasis> specify this host string in
     order to use this backend.
    </para>
   </listitem>
  </varlistentry>

  <varlistentry><term>element <literal moreinfo="none">cql2rpn</literal> (optional)</term>
   <listitem>
    <para>
     Specifies a filename that includes CQL to RPN conversion for this
     backend server. See <xref linkend="cql.to.rpn"/>
     If given, the backend server will only "see" a Type-1/RPN query. 
    </para>
   </listitem>
  </varlistentry>

  <varlistentry><term>element <literal moreinfo="none">ccl2rpn</literal> (optional)</term>
   <listitem>
    <para>
     Specifies a filename that includes CCL to RPN conversion for this
     backend server. See <xref linkend="ccl.qualifiers"/>
     If given, the backend server will only "see" a Type-1/RPN query. 
    </para>
   </listitem>
  </varlistentry>

  <varlistentry><term>element <literal moreinfo="none">stylesheet</literal> (optional)</term>
   <listitem>
    <para>
     Specifies the stylesheet reference to be part of SRU HTTP responses
     when the client does not specify one. If neither this is given, nor
     the client specifies one, no stylesheet reference is part of the
     SRU HTTP response.
    </para>
   </listitem>
  </varlistentry>
   
  <varlistentry><term>element <literal moreinfo="none">docpath</literal> (optional)</term>
   <listitem>
    <para>
     Specifies a path for local file access using HTTP. All URLs with
     a leading prefix (/ exluded) that matches the value of docpath
     are used for file access. For example, if the server is to offer
     access in directory <literal moreinfo="none">xsl</literal>, the docpath would be
     <literal moreinfo="none">xsl</literal> and all URLs of the form
     <literal moreinfo="none">http://host/exl</literal> will result in a local file access.
    </para>
   </listitem>
  </varlistentry>
   
  <varlistentry><term>element <literal moreinfo="none">explain</literal> (optional)</term>
   <listitem>
    <para>
     Specifies SRW/SRU ZeeRex content for this server. Copied verbatim
     to the client. As things are now, some of the Explain content
     seeem redundant because host information, etc. is also stored
     elsewhere.
    </para>
   </listitem>
  </varlistentry>

  <varlistentry><term>element <literal moreinfo="none">maximumrecordsize</literal> (optional)</term>
   <listitem>
    <para>
     Specifies maximum record size/message size, in bytes. This
     value also servers as maximum size of <emphasis>incoming</emphasis>
     packages (for Record Updates etc). It's the same value as that
     given by the <literal moreinfo="none">-k</literal> option.
    </para>
   </listitem>
  </varlistentry>

  <varlistentry><term>element <literal moreinfo="none">retrievalinfo</literal> (optional)</term>
   <listitem>
    <para>
     Enables the retrieval facility supporting conversions and
     specifications of record formats/types.
     See <xref linkend="tools.retrieval"/> for
     more information.
    </para>
   </listitem>
  </varlistentry>
   
 </variablelist>
</para>
 
<para>
 The XML below configures a server that accepts connections from
 two ports, TCP/IP port 9900 and a local UNIX file socket.
 We name the TCP/IP server <literal moreinfo="none">public</literal> and the
 other server <literal moreinfo="none">internal</literal>.
 </para>
 <screen format="linespecific">
  
 &lt;yazgfs&gt;
  &lt;listen id="public"&gt;tcp:@:9900&lt;/listen&gt;
  &lt;listen id="internal"&gt;unix:/var/tmp/socket&lt;/listen&gt;
  &lt;server id="server1"&gt;
    &lt;host&gt;server1.mydomain&lt;/host&gt;
    &lt;directory&gt;/var/www/s1&lt;/directory&gt;
    &lt;config&gt;config.cfg&lt;/config&gt;
  &lt;/server&gt;
  &lt;server id="server2"&gt;
    &lt;host&gt;server2.mydomain&lt;/host&gt;
    &lt;directory&gt;/var/www/s2&lt;/directory&gt;
    &lt;config&gt;config.cfg&lt;/config&gt;
    &lt;cql2rpn&gt;../etc/pqf.properties&lt;/cql2rpn&gt;
    &lt;explain xmlns="http://explain.z3950.org/dtd/2.0/"&gt;
      &lt;serverInfo&gt;
        &lt;host&gt;server2.mydomain&lt;/host&gt;
        &lt;port&gt;9900&lt;/port&gt;
        &lt;database&gt;a&lt;/database&gt;
      &lt;/serverInfo&gt;
    &lt;/explain&gt;
  &lt;/server&gt;
  &lt;server id="server3" listenref="internal"&gt;
    &lt;directory&gt;/var/www/s3&lt;/directory&gt;
    &lt;config&gt;config.cfg&lt;/config&gt;
  &lt;/server&gt;
 &lt;/yazgfs&gt;

 </screen>
<para>
 There are three configured backend servers. The first two
 servers, <literal moreinfo="none">"server1"</literal> and <literal moreinfo="none">"server2"</literal>,
 can be reached by both listener addresses - since
 no <literal moreinfo="none">listenref</literal> attribute is specified.
 In order to distinguish between the two a virtual host has
 been specified for each of server in the <literal moreinfo="none">host</literal>
 elements.
</para>
<para>
 For <literal moreinfo="none">"server2"</literal> elements for CQL to RPN conversion
 is supported and explain information has been added (a short one here
 to keep the example small).
</para>
<para>
 The third server, <literal moreinfo="none">"server3"</literal> can only be reached
 via listener <literal moreinfo="none">"internal"</literal>.
</para>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
sgml-parent-document: "yaz.xml"
sgml-local-catalogs: nil
sgml-namecase-general:t
End:
-->

 </refsect1>
 <refsect1><title>FILES</title>
  <para>
   <filename moreinfo="none">yaz-&lt;version&gt;/ztest/yaz-ztest.c</filename>
  </para>
  <para>
   <filename moreinfo="none">yaz-&lt;version&gt;/include/yaz/backend.h</filename>
  </para>
 </refsect1>
 <refsect1><title>SEE ALSO</title>
  <para>
   <citerefentry>
    <refentrytitle>yaz</refentrytitle>
    <manvolnum>7</manvolnum>
   </citerefentry>
   <citerefentry>
    <refentrytitle>yaz-log</refentrytitle>
    <manvolnum>7</manvolnum>
   </citerefentry>
  </para>
 </refsect1>
</refentry>
<!--Generated by stripref.xsl . Do not edit-->
<refentry id="yaz-config">
 <refentryinfo>
  <productname class="trade">YAZ</productname>
  <productnumber>3.0.28</productnumber>
 </refentryinfo>
 
 <refmeta>
  <refentrytitle>yaz-config</refentrytitle>
  <manvolnum>8</manvolnum>
 </refmeta>
 
 <refnamediv>
  <refname>yaz-config</refname>
  <refpurpose>Script to get information about YAZ.</refpurpose>
 </refnamediv>
 
 <refsynopsisdiv>
  <cmdsynopsis sepchar=" ">
   <command moreinfo="none">yaz-config</command>
   <arg choice="opt" rep="norepeat"><option>--prefix[=<replaceable>DIR</replaceable>]</option></arg>
   <arg choice="opt" rep="norepeat"><option>--version</option></arg>
   <arg choice="opt" rep="norepeat"><option>--libs</option></arg>
   <arg choice="opt" rep="norepeat"><option>--lalibs</option></arg>
   <arg choice="opt" rep="norepeat"><option>--cflags</option></arg>
   <arg choice="opt" rep="norepeat"><option>--comp</option></arg>
   <arg choice="opt" rep="repeat">libraries</arg>
  </cmdsynopsis>
 </refsynopsisdiv>
 
 <refsect1><title>DESCRIPTION</title>
  <para>
   <command moreinfo="none">yaz-config</command> is a script that returns information
   that your own software should use to build software that uses YAZ.
  </para>

  <para>
   The following libraries are supported:
  </para>

  <variablelist>
   <varlistentry>
    <term>threads</term>
    <listitem><para>
      Use the threaded version of YAZ.
     </para></listitem>
   </varlistentry>
  </variablelist>
  
 </refsect1>
 
 <refsect1><title>OPTIONS</title>
  
  <variablelist>
   <varlistentry>
    <term>--prefix[=<replaceable>DIR</replaceable>]</term>
    <listitem><para>
      Returns prefix of YAZ or assume a different one if DIR is
      specified.
     </para></listitem>
   </varlistentry>

   <varlistentry>
    <term>--version</term>
    <listitem><para>
      Returns version of YAZ.
     </para></listitem>
   </varlistentry>

   <varlistentry>
    <term>--libs</term>
    <listitem><para>
      Library specification be used when using YAZ.
     </para></listitem>
   </varlistentry>

   <varlistentry>
    <term>--lalibs</term>
    <listitem><para>
      Return library specification.
     </para></listitem>
   </varlistentry>

   <varlistentry>
    <term>--cflags</term>
    <listitem><para>
      Return C Compiler flags.
     </para></listitem>
   </varlistentry>

   <varlistentry>
    <term>--comp</term>
    <listitem><para>
      Returns full path to YAZ' ASN.1 compiler: yaz-asncomp.
     </para></listitem>
   </varlistentry>

  </variablelist>
 </refsect1>
 
 <refsect1><title>FILES</title>
  <para>
   <filename moreinfo="none">/usr/local/bin/yaz-config</filename>
  </para>
  <para>
   <filename moreinfo="none">/usr/local/lib/libyaz*.a</filename>
  </para>
  <para>
   <filename moreinfo="none">/usr/local/include/yaz/*.h</filename>
  </para>
  </refsect1>
 <refsect1><title>SEE ALSO</title>
  <para>
   yaz(7)
  </para>
  <para>
   Section "How to make apps using YAZ on UNIX" in the YAZ manual.
  </para>
 </refsect1>
</refentry>
<!--Generated by stripref.xsl . Do not edit-->
<refentry id="yaz">
 <refentryinfo>
  <productname class="trade">YAZ</productname>
  <productnumber>3.0.28</productnumber>
 </refentryinfo>
 
 <refmeta>
  <refentrytitle>yaz</refentrytitle>
  <manvolnum>7</manvolnum>
 </refmeta>
 
 <refnamediv>
  <refname>yaz</refname>
  <refpurpose>Z39.50 toolkit.</refpurpose>
 </refnamediv>
 
 <refsynopsisdiv>
  <cmdsynopsis sepchar=" ">
   <command moreinfo="none">YAZ</command>
  </cmdsynopsis>
 </refsynopsisdiv>
 
 <refsect1><title>DESCRIPTION</title>
  <para>
   YAZ is a C/C++ programmer's toolkit supporting the development
   of Z39.50v3 clients and servers. The YAZ toolkit offers
   several different levels of access to the ISO23950/Z39.50, SRU
   and ILL protocols. The level that you need to use depends
   on your requirements, and the role (server of client) that you want
   to implement.
  </para>
 </refsect1>

 <refsect1><title>COPYRIGHT</title>
  <para>
   Copyright © 1995-2008 Index Data.
  </para>
  <para>
   All rights reserved.
  </para>
  
  <para>
   Redistribution and use in source and binary forms, with or without
   modification, are permitted provided that the following conditions are met:
  </para>
  
  <itemizedlist>
   <listitem>
    <para>
     Redistributions of source code must retain the above copyright
     notice, this list of conditions and the following disclaimer.
    </para>
   </listitem>
   <listitem>
    <para>
     Redistributions in binary form must reproduce the above copyright
     notice, this list of conditions and the following disclaimer in the
     documentation and/or other materials provided with the distribution.
    </para>
   </listitem>
   <listitem>
    <para>
     Neither the name of Index Data nor the names of its contributors
     may be used to endorse or promote products derived from this
     software without specific prior written permission.
    </para>
   </listitem>
  </itemizedlist>
  
  <para>
   THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
   EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR
   ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
   SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
   CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   SUCH DAMAGE.
  </para>
  
 </refsect1>
 
 <refsect1><title>SEE ALSO</title>
  <para>
    <citerefentry>
     <refentrytitle>yaz-client</refentrytitle>
     <manvolnum>1</manvolnum>
    </citerefentry>,
    <citerefentry>
     <refentrytitle>yaz-ztest</refentrytitle>
     <manvolnum>8</manvolnum>
    </citerefentry>,
    <citerefentry>
     <refentrytitle>yaz-config</refentrytitle>
     <manvolnum>8</manvolnum>
    </citerefentry>,
    <citerefentry>
     <refentrytitle>zoomsh</refentrytitle>
     <manvolnum>1</manvolnum>
    </citerefentry>
  </para>
  <para>YAZ manual (
   <filename moreinfo="none">/usr/local/share/doc/yaz</filename>)
  </para>
  <para>
   <ulink url="http://www.indexdata.com/yaz/">YAZ home page</ulink>.
  </para>
  <para>
   <ulink url="http://www.loc.gov/z3950/agency/">Z39.50 Maintenance Agency Page</ulink>.
  </para>
 </refsect1>
</refentry>
<!--Generated by stripref.xsl . Do not edit-->
<refentry id="zoomsh">
 <refentryinfo>
  <productname class="trade">YAZ</productname>
  <productnumber>3.0.28</productnumber>
 </refentryinfo>
 
 <refmeta>
  <refentrytitle>zoomsh</refentrytitle>
  <manvolnum>1</manvolnum>
 </refmeta>
 
 <refnamediv>
  <refname>zoomsh</refname>
  <refpurpose>ZOOM shell</refpurpose>
 </refnamediv>

 <refsynopsisdiv>
  <cmdsynopsis sepchar=" ">
   <command moreinfo="none">zoomsh</command>
   <arg choice="opt" rep="repeat">commands</arg>
  </cmdsynopsis>
 </refsynopsisdiv>

  <refsect1><title>DESCRIPTION</title>
   <para>
    <command moreinfo="none">zoomsh</command> is a ZOOM client with a simple
    command line interface. The client demonstrates the ZOOM
    API and is useful for testing targets.
   </para>
   <para>
    You may pass one or more commands to <command moreinfo="none">zoomsh</command>.
    These commands are invoked first. 
   </para>
  </refsect1>
  <refsect1><title>EXAMPLES</title>
   <para>
    If you start the <command moreinfo="none">yaz-ztest</command> in one console you
    can use the ZOOM shell as follows:
    <screen format="linespecific">
$ zoomsh
ZOOM&gt;connect localhost:9999
ZOOM&gt;search computer
localhost:9999: 7 hits
ZOOM&gt;show 0 1
1 Default USmarc
001    11224466 
003 DLC
005 00000000000000.0
008 910710c19910701nju           00010 eng  
010    $a    11224466 
040    $a DLC $c DLC
050 00 $a 123-xyz
100 10 $a Jack Collins
245 10 $a How to program a computer
260 1  $a Penguin
263    $a 8710
300    $a p. cm.
ZOOM&gt;quit

    </screen>
   </para>
   <para>
    You can also achieve the same result by passing the commands
    as arguments on a single command line:
   </para>
   <para>
    <literal moreinfo="none">$ zoomsh "connect localhost:9999" "search computer"</literal>
    <literal moreinfo="none">"show 0 1" quit</literal>
   </para>
  </refsect1>
  <refsect1><title>COMMANDS</title>
   <variablelist>
    
    <varlistentry><term><literal moreinfo="none">connect</literal>
      <replaceable>zurl</replaceable></term>
     <listitem><para>
       Connects to the target given by <replaceable>zurl</replaceable>.
      </para></listitem></varlistentry>
    
    <varlistentry><term><literal moreinfo="none">close</literal>
      [<replaceable>zurl</replaceable>]</term>
     <listitem><para>
       Closes connection to target given by
       <replaceable>zurl</replaceable> or all targets if
       <replaceable>zurl</replaceable> was omitted.
      </para></listitem></varlistentry>
    
    <varlistentry><term><literal moreinfo="none">show</literal>
      [<replaceable>start</replaceable>
      [<replaceable>count</replaceable>]]
     </term>
     <listitem><para>
       Displays <literal moreinfo="none">count</literal> records starting at offset given
       by <replaceable>start</replaceable>. First records has offset 0
       (unlike the Z39.50 protocol).
      </para></listitem></varlistentry>
    
    <varlistentry><term><literal moreinfo="none">quit</literal>
     </term>
     <listitem><para>
       Quits <command moreinfo="none">zoomsh</command>.
      </para></listitem></varlistentry>
    
    <varlistentry><term><literal moreinfo="none">set</literal>
      <replaceable>name</replaceable>
      [<replaceable>value</replaceable>]
     </term>
     <listitem><para>
       Sets option <replaceable>name</replaceable> to
       <replaceable>value</replaceable>.
      </para></listitem></varlistentry>
    
    <varlistentry><term><literal moreinfo="none">get</literal>
      <replaceable>name</replaceable>
     </term>
     <listitem><para>
       Prints value of option <replaceable>name</replaceable>.
      </para></listitem></varlistentry>
    
    <varlistentry><term><literal moreinfo="none">help</literal>
     </term>
     <listitem><para>
       Prints list of available commands.
      </para></listitem></varlistentry>
    
   </variablelist>
   
  </refsect1>
  <refsect1><title>SEE ALSO</title>
   <para>
    <citerefentry>
     <refentrytitle>yaz</refentrytitle>
     <manvolnum>7</manvolnum>
    </citerefentry>,
    <citerefentry>
     <refentrytitle>yaz-ztest</refentrytitle>
     <manvolnum>8</manvolnum>
    </citerefentry>,
   </para>
   <para>
    Section "Building clients with ZOOM" in the YAZ manual.
   </para>
   <para>
    <ulink url="http://zoom.z3950.org/">ZOOM home page</ulink>.
   </para>
  </refsect1>
</refentry>
<!--Generated by stripref.xsl . Do not edit-->
<refentry id="yaz-asncomp">
 <refentryinfo>
  <productname class="trade">YAZ</productname>
  <productnumber>3.0.28</productnumber>
 </refentryinfo>
 
 <refmeta>
  <refentrytitle>yaz-asncomp</refentrytitle>
  <manvolnum>1</manvolnum>
 </refmeta>
 
 <refnamediv>
  <refname>yaz-asncomp</refname>
  <refpurpose>YAZ ASN.1 compiler</refpurpose>
 </refnamediv>
 
 <refsynopsisdiv>
  <cmdsynopsis sepchar=" ">
   <command moreinfo="none">yaz-asncomp</command>
   <arg choice="opt" rep="norepeat"><option>-v</option></arg>
   <arg choice="opt" rep="norepeat"><option>-c <replaceable>cfile</replaceable></option></arg>
   <arg choice="opt" rep="norepeat"><option>-h <replaceable>hfile</replaceable></option></arg>
   <arg choice="opt" rep="norepeat"><option>-p <replaceable>pfile</replaceable></option></arg>
   <arg choice="opt" rep="norepeat"><option>-d <replaceable>config</replaceable></option></arg>
   <arg choice="opt" rep="norepeat"><option>-I <replaceable>includeout</replaceable></option></arg>
   <arg choice="opt" rep="norepeat"><option>-i <replaceable>includedir</replaceable></option></arg>
   <arg choice="opt" rep="norepeat"><option>-m <replaceable>module</replaceable></option></arg>
   <arg choice="opt" rep="norepeat">filename</arg>
  </cmdsynopsis>
  
 </refsynopsisdiv>
  <refsect1><title>DESCRIPTION</title>
  <para>
   <command moreinfo="none">yaz-asncomp</command> is an ASN.1 compiler that
   reads an ASN.1 specification in <replaceable>filename</replaceable>
   and produces C/C++ definitions and BER encoders/decoders for it.
  </para>
  <para>
   The produced C/C++ code and header files uses the ODR module of YAZ
   which is a library that encodes/decodes/prints BER packages.
   <command moreinfo="none">yaz-asncomp</command> allows you to specify name of
   resulting source via options. Alternatively, you can specify
   a DEFINISIONS file, which provides customized output to
   many output files - if the ASN.1 specification file consists
   of many modules.
  </para>
  <para>
   This utility is written in Tcl. Any version of Tcl should work.
  </para>
  </refsect1>
    <refsect1>
  <title>OPTIONS</title>
  <variablelist>
   <varlistentry><term><literal moreinfo="none">-v </literal>
 </term>
    <listitem>
     <para>
      Makes the ASN.1 compiler print more verbose about the
      various stages of operations. 
     </para>
    </listitem>
   </varlistentry>
   
   <varlistentry><term><literal moreinfo="none">-c </literal>
     <replaceable>cfile</replaceable></term>
    <listitem><para>
      Specifies the name of the C/C++ file with encoders/decoders.
     </para></listitem>
   </varlistentry>
   
   <varlistentry><term><literal moreinfo="none">-h </literal>
     <replaceable>hfile</replaceable></term>
    <listitem><para>
      Specifies the name of header file with definitions.
     </para></listitem>
   </varlistentry>
   
   <varlistentry><term><literal moreinfo="none">-p </literal>
     <replaceable>pfile</replaceable></term>
    <listitem><para>
      Specifies the name of the a private header file with
      definitions. By default all definitions are put
      in header file (option -h).
     </para></listitem>
   </varlistentry>
   
   <varlistentry><term><literal moreinfo="none">-d </literal>
     <replaceable>dfile</replaceable></term>
    <listitem><para>
      Specifies the name of a definitions file.
     </para></listitem>
   </varlistentry>
   
   <varlistentry><term><literal moreinfo="none">-I </literal>
     <replaceable>iout</replaceable></term>
    <listitem><para>
      Specifies first part of directory in which header files
      are written.
     </para></listitem>
   </varlistentry>
   
   <varlistentry><term><literal moreinfo="none">-i </literal>
     <replaceable>idir</replaceable></term>
    <listitem><para>
      Specifies second part of directory in which header files
      are written.
     </para></listitem>
   </varlistentry>
   
   <varlistentry><term><literal moreinfo="none">-m </literal>
     <replaceable>module</replaceable></term>
    <listitem><para>
      Specifies that ASN.1 compiler should only process the
      module given. If this option is not specified,
      all modules in the ASN.1 file are processed.
     </para></listitem>
   </varlistentry>
   
  </variablelist>
 </refsect1>
 <refsect1><title>DEFINITIONS FILE</title>
  <para>
   The definitions file is really a Tcl script but follows
   traditional rules for Shell like configuration files.
   That is # denotes the beginning of a comment. Definitions
   are line oriented. The definitions files usually consists of
   a series of variable assignments of the form:
  </para>
  <para>
   <literal moreinfo="none">set</literal> <replaceable>name</replaceable> <replaceable>value</replaceable>
  </para>
  <para>
   Available variables are:
   <variablelist>
    
    <varlistentry><term><literal moreinfo="none">default-prefix</literal></term>
     <listitem><para>
       Sets prefix for names in the produced output.
       The value consists of three tokens: C function prefix,
       C typedef prefix and preprocessor prefix respectively.
      </para></listitem>
    </varlistentry>
    
    <varlistentry><term><literal moreinfo="none">prefix(</literal><replaceable>module</replaceable><literal moreinfo="none">)</literal></term>
     <listitem><para>
       This value sets prefix values for module
       <replaceable>module</replaceable>.
       The value has same form as <literal moreinfo="none">default-prefix</literal>.
      </para></listitem>
    </varlistentry>
    
    <varlistentry><term><literal moreinfo="none">filename(</literal><replaceable>module</replaceable><literal moreinfo="none">)</literal></term>
     <listitem><para>
       Specifies filename for C/header file for module
       <replaceable>module</replaceable>.
      </para></listitem>
    </varlistentry>
    
    <varlistentry><term><literal moreinfo="none">init(</literal><replaceable>module</replaceable><literal moreinfo="none">,h)</literal></term>
     <listitem><para>
       Code fragment to be put in first part of public header for module 
    <replaceable>module</replaceable>.
      </para></listitem>
    </varlistentry>
    
    <varlistentry><term><literal moreinfo="none">body(</literal><replaceable>module</replaceable><literal moreinfo="none">,h)</literal></term>
     <listitem><para>
       Code fragment to be put in last part of public header for module 
    <replaceable>module</replaceable> (trailer).
      </para></listitem>
    </varlistentry>

    <varlistentry><term><literal moreinfo="none">init(</literal><replaceable>module</replaceable><literal moreinfo="none">,c)</literal></term>
     <listitem><para>
       Code fragment to be put in first part of C based encoder/decoder for
       module <replaceable>module</replaceable>.
      </para></listitem>
    </varlistentry>
    
    <varlistentry><term><literal moreinfo="none">body(</literal><replaceable>module</replaceable><literal moreinfo="none">,c)</literal></term>
     <listitem><para>
       Code fragment to be put in last part of C based encoder/decoder for
       module <replaceable>module</replaceable> (trailer).
      </para></listitem>
    </varlistentry>
    
    <varlistentry><term><literal moreinfo="none">map(</literal><replaceable>module</replaceable><literal moreinfo="none">,</literal><replaceable>name</replaceable><literal moreinfo="none">)</literal></term>
     <listitem><para>
       Maps ASN.1 type in module <replaceable>module</replaceable> 
       of <replaceable>name</replaceable> to value.
      </para></listitem>
    </varlistentry>
    
    <varlistentry><term><literal moreinfo="none">membermap(</literal><replaceable>module</replaceable><literal moreinfo="none">,</literal><replaceable>name</replaceable><literal moreinfo="none">,</literal><replaceable>member</replaceable><literal moreinfo="none">)</literal></term>
     <listitem><para>
       Maps member <replaceable>member</replaceable> in SEQUENCE/CHOICE of
       <replaceable>name</replaceable> in module
       <replaceable>module</replaceable> to value.
       The value consists of one or two tokens.
       First token is name of C preprocessor part. Second token
       is resulting C member name. If second token is omitted
       the value (one token) is both preprocessor part and
       C <literal moreinfo="none">struct</literal>,<literal moreinfo="none">union</literal>.
      </para></listitem>
    </varlistentry>
    
    <varlistentry><term><literal moreinfo="none">unionmap(</literal><replaceable>module</replaceable><literal moreinfo="none">,</literal><replaceable>name</replaceable><literal moreinfo="none">,</literal><replaceable>member</replaceable><literal moreinfo="none">)</literal></term>
     <listitem><para>
       Maps member <replaceable>member</replaceable> in CHOICE of
       <replaceable>name</replaceable> in module
       <replaceable>module</replaceable> to value.
       Value consists of to or three tokens. The first token
       is name of the integer in the <literal moreinfo="none">union</literal> that
       is used as selector for the <literal moreinfo="none">union</literal> itself.
       The second token is name of the <literal moreinfo="none">union</literal>.
       The third token overrides the name of the CHOICE member;
       if omitted the member name is used.
      </para></listitem>
    </varlistentry>
   </variablelist>
  </para>
 </refsect1>
 <refsect1><title>FILES</title>
  <para>
   <filename moreinfo="none">/usr/share/yaz/z39.50/z.tcl</filename>
  </para>
  <para>
   <filename moreinfo="none">/usr/share/yaz/z39.50/*.asn</filename>
  </para>
 </refsect1>
 <refsect1><title>SEE ALSO</title>
  <para>
   <citerefentry>
    <refentrytitle>yaz</refentrytitle>
    <manvolnum>7</manvolnum></citerefentry>
  </para>
  <para>
   Section "The ODR Module" in the YAZ manual.
  </para>
 </refsect1>
</refentry>
<!--Generated by stripref.xsl . Do not edit-->
<refentry id="yaz-marcdump">
 <refentryinfo>
  <productname class="trade">YAZ</productname>
  <productnumber>3.0.28</productnumber>
 </refentryinfo>
 <refmeta>
  <refentrytitle>yaz-marcdump</refentrytitle>
  <manvolnum>1</manvolnum>
 </refmeta>
 
 <refnamediv>
  <refname>yaz-marcdump</refname>
  <refpurpose>MARC record dump utility</refpurpose>
 </refnamediv>
 
 <refsynopsisdiv>
  <cmdsynopsis sepchar=" ">
   <command moreinfo="none">yaz-marcdump</command>
   <arg choice="opt" rep="norepeat"><option>-i <replaceable>format</replaceable></option></arg>
   <arg choice="opt" rep="norepeat"><option>-o <replaceable>format</replaceable></option></arg>
   <arg choice="opt" rep="norepeat"><option>-f <replaceable>from</replaceable></option></arg>
   <arg choice="opt" rep="norepeat"><option>-t <replaceable>to</replaceable></option></arg>
   <arg choice="opt" rep="norepeat"><option>-l <replaceable>spec</replaceable></option></arg>
   <arg choice="opt" rep="norepeat"><option>-v</option></arg>
   <arg choice="opt" rep="norepeat"><option>-c <replaceable>cfile</replaceable></option></arg>
   <arg choice="opt" rep="norepeat"><option>-s <replaceable>prefix</replaceable></option></arg>
   <arg choice="opt" rep="norepeat"><option>-C <replaceable>size</replaceable></option></arg>
   <arg choice="opt" rep="norepeat"><option>-p</option></arg>
   <arg choice="opt" rep="repeat">file</arg>
  </cmdsynopsis>
 </refsynopsisdiv>
 
 <refsect1><title>DESCRIPTION</title>
  <para>
   <command moreinfo="none">yaz-marcdump</command> reads MARC records from one or
   more files.
   It parses each record and supports output in line-format, 
   ISO2709, MARCXML, MarcXchange as well as Hex output.
  </para>
  <para>
   This utility parses records ISO2709(raw MARC) as well as XML
   if that is structured as MARCXML/MarcXchange.
  </para>
  <note>
   <para>
    As of YAZ 2.1.18, OAI-MARC is no longer supported.
    OAI-MARC is deprecated. Use MARCXML instead.
   </para>
  </note>
  <para>
   By default, each record is written to standard output in a line
   format with newline for each field, $x for each subfield x.
   The output format may be changed with option <literal moreinfo="none">-o</literal>,
  </para>
  <para>
   <command moreinfo="none">yaz-marcdump</command> can also be requested to perform
   character set conversion of each record.
  </para>
 </refsect1>
 
 <refsect1><title>OPTIONS</title>
  
  <variablelist>
   <varlistentry>
    <term>-i <replaceable>format</replaceable></term>
    <listitem><para>
      Specifies input format. Must be one of
      <literal moreinfo="none">marcxml</literal>, <literal moreinfo="none">marc</literal> (ISO2709),
      <literal moreinfo="none">marcxchange</literal> (ISO25577),
      <literal moreinfo="none">line</literal> (line mode MARC).
     </para></listitem>
   </varlistentry>

   <varlistentry>
    <term>-o <replaceable>format</replaceable></term>
    <listitem><para>
      Specifies output format. Must be one of
      <literal moreinfo="none">marcxml</literal>, <literal moreinfo="none">marc</literal> (ISO2709),
      <literal moreinfo="none">marcxchange</literal> (ISO25577),
      <literal moreinfo="none">line</literal> (line mode MARC).
     </para></listitem>
   </varlistentry>

   <varlistentry>
    <term>-f <replaceable>from</replaceable></term>
    <listitem><para>
      Specify the character set <replaceable>from</replaceable>
      of the input MARC record.
      Should be used in conjunction with option <literal moreinfo="none">-t</literal>.
     </para></listitem>
   </varlistentry>

   <varlistentry>
    <term>-t <replaceable>to</replaceable></term>
    <listitem><para>
      Specify the character set <replaceable>of</replaceable>
      of the output.
      Should be used in conjunction with option <literal moreinfo="none">-f</literal>.
     </para></listitem>
   </varlistentry>

   <varlistentry>
    <term>-l <replaceable>leaderspec</replaceable></term>
    <listitem><para>
      Specify a simple modification string for MARC leader. The
      <replaceable>leaderspec</replaceable> is a list of pos=value
      pairs, where pos is an integer offset (0 - 23) for leader. Value
      is either a quoted string or an integer (character value in decimal).
      Pairs are comma separated. For example, to set leader at offset 9
      to a, use <literal moreinfo="none">9=a</literal>.
     </para></listitem>
   </varlistentry>

   <varlistentry>
    <term>-v</term>
    <listitem><para>
      Writes more information about the parsing process.
      Useful if you have ill-formatted ISO2709 records as input.
     </para></listitem>
   </varlistentry>

   <varlistentry>
    <term>-s <replaceable>prefix</replaceable></term>
    <listitem><para>
      Writes a chunk of records to a separate file with prefix given,
      i.e. splits a record batch into files with only at most
      "chunk" ISO2709 record per file. By default chunk is 1 (one record
      per file). See option <literal moreinfo="none">-C</literal>.
     </para></listitem>
   </varlistentry>

   <varlistentry>
    <term>-C <replaceable>chunksize</replaceable></term>
    <listitem><para>
      Specifies chunk size; to be used conjunction with option 
      <literal moreinfo="none">-s</literal>.
     </para></listitem>
   </varlistentry>

   <varlistentry>
    <term>-p</term>
    <listitem><para>
      Makes yaz-marcdump prints record number and input file offset
      of each record read.
     </para></listitem>
   </varlistentry>

  </variablelist>
 </refsect1>

 <refsect1><title>EXAMPLES</title>
  <para>
   The following command converts MARC21/USMARC in MARC-8 encoding to
   MARC21/USMARC in UTF-8 encoding. Leader offset 9 is set to 'a'.
   Both input and output records are ISO2709 encoded.
   <screen format="linespecific">
    yaz-marcdump -f MARC-8 -t UTF-8 -o marc -l 9=97 marc21.raw &gt;marc21.utf8.raw
   </screen>
  </para>
  <para>
   The same records may be converted to MARCXML instead in UTF-8:
   <screen format="linespecific">
    yaz-marcdump -f MARC-8 -t UTF-8 -o marcxml marc21.raw &gt;marcxml.xml
   </screen>
  </para>
 </refsect1> 

 <refsect1><title>FILES</title>
  <para>
   <filename moreinfo="none"><replaceable>prefix</replaceable>/bin/yaz-marcdump</filename>
  </para>
  <para>
   <filename moreinfo="none"><replaceable>prefix</replaceable>/include/yaz/marcdisp.h</filename>
  </para>
  </refsect1>
 <refsect1><title>SEE ALSO</title>
  <para>
   yaz(7)
  </para>
 </refsect1>
</refentry>
<!--Generated by stripref.xsl . Do not edit-->
<refentry id="yaz-iconv">
 <refentryinfo>
  <productname class="trade">YAZ</productname>
  <productnumber>3.0.28</productnumber>
 </refentryinfo>
 
 <refmeta>
  <refentrytitle>yaz-iconv</refentrytitle>
  <manvolnum>1</manvolnum>
 </refmeta>
 
 <refnamediv>
  <refname>yaz-iconv</refname>
  <refpurpose>YAZ Charcter set conversion utility</refpurpose>
 </refnamediv>
 
 <refsynopsisdiv>
  <cmdsynopsis sepchar=" ">
   <command moreinfo="none">yaz-iconv</command>
   <arg choice="opt" rep="norepeat"><option>-f <replaceable>from</replaceable></option></arg>
   <arg choice="opt" rep="norepeat"><option>-t <replaceable>to</replaceable></option></arg>
   <arg choice="opt" rep="norepeat"><option>-v</option></arg>
   <arg choice="opt" rep="repeat">file</arg>
  </cmdsynopsis>
 </refsynopsisdiv>
 
 <refsect1><title>DESCRIPTION</title>
  <para>
   <command moreinfo="none">yaz-iconv</command> converts data in file in character
   set specified by <replaceable>from</replaceable> to output in
   character set as specified by <replaceable>to</replaceable>.
  </para>
  <para>
   This <command moreinfo="none">yaz-iconv</command> utility similar to the
   <command moreinfo="none">iconv</command> found on many POSIX systems (Glibc, Solaris, etc).
  </para>
  <para>
   If no <replaceable>file</replaceable> is specified,
   <command moreinfo="none">yaz-iconv</command> reads from standard input.
  </para>
 </refsect1>
 
 <refsect1><title>OPTIONS</title>
  
  <variablelist>
   <varlistentry>
    <term>-f<replaceable>from</replaceable>]</term>
    <listitem><para>
      Specify the character set <replaceable>from</replaceable>
      of the input file.
      Should be used in conjunction with option <literal moreinfo="none">-t</literal>.
     </para></listitem>
   </varlistentry>

   <varlistentry>
    <term>-t<replaceable>to</replaceable>]</term>
    <listitem><para>
      Specify the character set <replaceable>of</replaceable>
      of the output.
      Should be used in conjunction with option <literal moreinfo="none">-f</literal>.
     </para></listitem>
   </varlistentry>

   <varlistentry>
    <term>-v</term>
    <listitem><para>
      Print more information about the conversion process.
     </para></listitem>
   </varlistentry>

  </variablelist>
 </refsect1>

 <refsect1><title>EXAMPLES</title>
  <para>
   The following command converts from ISO-8859-1 (Latin-1) to
   UTF-8.
   <screen format="linespecific">
    yaz-iconv -f ISO-8859-1 -t UTF-8 -X &lt;input.lst &gt;output.lst
   </screen>
  </para>
 </refsect1> 

 <refsect1><title>FILES</title>
  <para>
   <filename moreinfo="none"><replaceable>prefix</replaceable>/bin/yaz-iconv</filename>
  </para>
  <para>
   <filename moreinfo="none"><replaceable>prefix</replaceable>/include/yaz/yaz-iconv.h</filename>
  </para>
 </refsect1>
 <refsect1><title>SEE ALSO</title>
  <para>
   yaz(7)
   iconv(1)
  </para>
 </refsect1>
</refentry>
<!--Generated by stripref.xsl . Do not edit-->
<refentry id="yaz-log">
 <refentryinfo>
  <productname class="trade">YAZ</productname>
  <productnumber>3.0.28</productnumber>
 </refentryinfo>
 
 <refmeta>
  <refentrytitle>yaz-log</refentrytitle>
  <manvolnum>7</manvolnum>
 </refmeta>
 
 <refnamediv>
  <refname>yaz-log</refname>
  <refpurpose>Log handling in all yaz-based programs</refpurpose>
 </refnamediv>
 
 <refsynopsisdiv>
  <cmdsynopsis sepchar=" ">
   <command moreinfo="none">yaz-XXXX</command>
   <arg choice="opt" rep="norepeat"><option>-v <replaceable>loglevel,...</replaceable></option></arg>
   <arg choice="opt" rep="norepeat"><option>-l <replaceable>logfile</replaceable></option></arg>
  </cmdsynopsis>
 </refsynopsisdiv>
 
 <refsect1><title>DESCRIPTION</title>
  <para>
   All YAZ-based programs use a common log subsystem, and should support
   common command line options for controlling it. This man page documents
   those.
  </para>
  <para>
  </para>
 </refsect1>
 
 <refsect1><title>OPTIONS</title>
  
  <variablelist>
   <varlistentry>
    <term>-l<replaceable> logfile</replaceable></term>
    <listitem>
     <para>
      Specify the file where the log is to be written. If none is specified,
      <filename moreinfo="none">stderr</filename> is used. The log is appended to this file.
      If the file grows overly large, it is silently rotated: It is renamed to
      <replaceable>logfile</replaceable>.1,
      <replaceable>logfile</replaceable>.2, .., 9 
      (old such file is deleted), and a
      new file is opened. The limit defaults to 1GB, but can be set by the
      program.
      The rotating limit can be specified with option <literal moreinfo="none">-r</literal>
      for the YAZ frontend server (yaz-ztest).
     </para>
     <para>
      Rotation can also be implicitly enabled by using a filename
      which gets changed for a given date, due to substitutions as
      given by the strftime(3) function.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term>-v<replaceable> loglevel</replaceable></term>
    <listitem><para>
      Specify the logging level. The argument is a set of log level names,
      separated by commas (no whitespace!), optionally preceded by a '-' to
      negate that level. Most programs have their own default, often
      containing <literal moreinfo="none">fatal,warn,log</literal>, and some
      application-specific values. The default list can be cleared with the
      word <literal moreinfo="none">none</literal>, or individual bits can be removed by
      prefixing them with a dash '-'.
     </para></listitem>
   </varlistentry>

  </variablelist>
 </refsect1>

 <refsect1><title>LOG LEVELS TO CONTROL LOGGING</title>
  <para>
   Some of the log levels control the way the log is written. 
  </para>
  <para>
   <literal moreinfo="none">flush</literal> causes the log to be flushed after every write.
   This can have serious implications to performance, and should not be used
   in production. On the other hand, when debugging a program crash, this can
   be extremely useful. The option <literal moreinfo="none">debug</literal> implies
   <literal moreinfo="none">flush</literal> as well.
  </para>
  <para>
   <literal moreinfo="none">notime</literal> prevents the writing of time stamps. This is
   intended for automatic test scripts, which should produce predictable log
   files that are easy to compare.
  </para>
  
 </refsect1> 

 <refsect1><title>GENERAL LOG LEVELS IN YAZ ITSELF</title>
  <para>
   YAZ itself uses the following log levels:
  </para>
  <para>
   <literal moreinfo="none">fatal</literal> for fatal errors, that prevent further execution
   of the program.
  </para>
  <para>
   <literal moreinfo="none">warn</literal> for warnings about things that should be corrected.
  </para>
  <para>
   <literal moreinfo="none">debug</literal> for debugging. This flag may be used temporarily
   when developing or debugging yaz, or a program that uses yaz. It is
   practically deprecated, you should be defining and using your own log
   levels (see below).
  </para>
  <para>
   <literal moreinfo="none">all</literal> turns on almost all hard-coded log levels. 
  </para>
  <para>
   <literal moreinfo="none">loglevel</literal> logs information about the log levels used by
   the program. Every time the log level is changed, lists all bits that are
   on. Every time a module asks for its log bits, this is logged. This can be
   used for getting an idea of what log levels are available in any program
   that uses yaz-log. Start the program with <literal moreinfo="none">-v
   none,loglevel</literal>, and do some common operations with it. Another way
   is to grep for <function moreinfo="none">yaz_log_module_level</function> in the source
   code, as in
   <screen format="linespecific">
      find . -name '*.[ch]' -print | 
         xargs grep yaz_log_module_level | 
         grep '"' |
         cut -d'"' -f2 | 
         sort -u   
   </screen>
  </para>
  <para>
   <literal moreinfo="none">eventl</literal>, <literal moreinfo="none">malloc</literal>, 
   <literal moreinfo="none">nmem</literal>, <literal moreinfo="none">odr</literal> are used internally for
   debugging yaz.
  </para>
  <para>
  </para>
 </refsect1> 

 <refsect1><title>LOG LEVELS FOR CLIENTS</title>
  <para>
   <literal moreinfo="none">zoom</literal> logs the calls to the zoom API, which may be useful
   in debugging client applications.
  </para>
 </refsect1> 

 <refsect1><title>LOG LEVELS FOR SERVERS</title>
  <para>
   <literal moreinfo="none">server</literal> logs the server functions on a high level,
   starting up, listening on a port, etc.
  </para>
  <para>
   <literal moreinfo="none">session</literal> logs individual sessions (connections).
  </para>
  <para>
   <literal moreinfo="none">request</literal> logs a one-liner for each request (init, search,
   etc).
  </para>
  <para>
   <literal moreinfo="none">requestdetail</literal> logs the details of every request, before
   it is passed to the back-end, and the results received from it.
  </para>
  <para>
   Each server program (zebra, etc) is supposed to define its own log levels
   in addition to these. As they depend on the server in question, they can
   not be described here. See above how to find out about them.
  </para>
 </refsect1>

 <refsect1><title>LOGGING EXAMPLES</title>
  <para>
   See what log levels yaz-ztest is using:
   <screen format="linespecific">
    yaz-ztest -1 -v none,loglevel
    14:43:29-23/11 [loglevel] Setting log level to 4096 = 0x00001000
    14:43:29-23/11 [loglevel] Static  log bit 00000001 'fatal' is off
    14:43:29-23/11 [loglevel] Static  log bit 00000002 'debug' is off
    14:43:29-23/11 [loglevel] Static  log bit 00000004 'warn' is off
    14:43:29-23/11 [loglevel] Static  log bit 00000008 'log' is off
    14:43:29-23/11 [loglevel] Static  log bit 00000080 'malloc' is off
    14:43:29-23/11 [loglevel] Static  log bit 00000800 'flush' is off
    14:43:29-23/11 [loglevel] Static  log bit 00001000 'loglevel' is ON
    14:43:29-23/11 [loglevel] Static  log bit 00002000 'server' is off
    14:43:29-23/11 [loglevel] Dynamic log bit 00004000 'session' is off
    14:43:29-23/11 [loglevel] Dynamic log bit 00008000 'request' is off
    14:44:13-23/11 yaz-ztest [loglevel] returning log bit 0x4000 for 'session'
    14:44:13-23/11 yaz-ztest [loglevel] returning log bit 0x2000 for 'server'
    14:44:13-23/11 yaz-ztest [loglevel] returning NO log bit for 'eventl'
    14:44:20-23/11 yaz-ztest [loglevel] returning log bit 0x4000 for 'session'
    14:44:20-23/11 yaz-ztest [loglevel] returning log bit 0x8000 for 'request'
    14:44:20-23/11 yaz-ztest [loglevel] returning NO log bit for 'requestdetail'
    14:44:20-23/11 yaz-ztest [loglevel] returning NO log bit for 'odr'
    14:44:20-23/11 yaz-ztest [loglevel] returning NO log bit for 'ztest'
   </screen>
  </para>
  <para>
   See the details of the requests for yaz-ztest
   <screen format="linespecific">
   ./yaz-ztest -1 -v requestdetail
   14:45:35-23/11 yaz-ztest [server] Adding static Z3950 listener on tcp:@:9999
   14:45:35-23/11 yaz-ztest [server] Starting server ./yaz-ztest pid=32200
   14:45:38-23/11 yaz-ztest [session] Starting session from tcp:127.0.0.1 (pid=32200)
   14:45:38-23/11 yaz-ztest [requestdetail] Got initRequest
   14:45:38-23/11 yaz-ztest [requestdetail] Id:        81
   14:45:38-23/11 yaz-ztest [requestdetail] Name:      YAZ
   14:45:38-23/11 yaz-ztest [requestdetail] Version:   2.0.28
   14:45:38-23/11 yaz-ztest [requestdetail] Negotiated to v3: srch prst del extendedServices namedresults scan sort
   14:45:38-23/11 yaz-ztest [request] Init from 'YAZ' (81) (ver 2.0.28) OK
   14:45:39-23/11 yaz-ztest [requestdetail] Got SearchRequest.
   14:45:39-23/11 yaz-ztest [requestdetail] ResultSet '1'
   14:45:39-23/11 yaz-ztest [requestdetail] Database 'Default'
   14:45:39-23/11 yaz-ztest [requestdetail] RPN query. Type: Bib-1
   14:45:39-23/11 yaz-ztest [requestdetail]  term 'foo' (general)
   14:45:39-23/11 yaz-ztest [requestdetail] resultCount: 7
   14:45:39-23/11 yaz-ztest [request] Search Z: @attrset Bib-1 foo  OK:7 hits
   14:45:41-23/11 yaz-ztest [requestdetail] Got PresentRequest.
   14:45:41-23/11 yaz-ztest [requestdetail] Request to pack 1+1 1
   14:45:41-23/11 yaz-ztest [requestdetail] pms=1048576, mrs=1048576
   14:45:41-23/11 yaz-ztest [request] Present: [1] 1+1  OK 1 records returned
   </screen> 
  </para>
 </refsect1> 

 <refsect1><title>LOG FILENAME EXAMPLES</title>
  <para>
   A file with format my_YYYYMMDD.log is where Y, M, D is year, month, and day
   digits is given as follows
   <literal moreinfo="none">-l my_%Y%m%d.log</literal> . And since the filename
   is depending on day, rotaion will occur on midnight.
  </para>
  <para>
   A weekly log could be specified as 
   <literal moreinfo="none">-l my_%Y%U.log</literal>.
  </para>
 </refsect1>
  
 <refsect1><title>FILES</title>
  <para>
   <filename moreinfo="none"><replaceable>prefix</replaceable>/include/yaz/log.h</filename>
   <filename moreinfo="none"><replaceable>prefix</replaceable>/src/log.c</filename>
  </para>
 </refsect1>
 <refsect1><title>SEE ALSO</title>
  <para>
   <citerefentry>
    <refentrytitle>yaz</refentrytitle>
    <manvolnum>7</manvolnum>
   </citerefentry>

   <citerefentry>
    <refentrytitle>yaz-ztest</refentrytitle>
    <manvolnum>8</manvolnum>
   </citerefentry>

   <citerefentry>
    <refentrytitle>yaz-client</refentrytitle>
    <manvolnum>1</manvolnum>
   </citerefentry>

   <citerefentry>
    <refentrytitle>strftime</refentrytitle>
    <manvolnum>3</manvolnum>
   </citerefentry>
  </para>
 </refsect1>
</refentry>
<!--Generated by stripref.xsl . Do not edit-->
<refentry id="yaz-illclient">
 <refentryinfo>
  <productname class="trade">YAZ</productname>
  <productnumber>3.0.28</productnumber>
 </refentryinfo>
 
 <refmeta>
  <refentrytitle>yaz-illclient</refentrytitle>
  <manvolnum>1</manvolnum>
 </refmeta>
 
 <refnamediv>
  <refname>yaz-illclient</refname>
  <refpurpose>ILL client</refpurpose>
 </refnamediv>
 
 <refsynopsisdiv>
  <cmdsynopsis sepchar=" ">
   <command moreinfo="none">yaz-illclient</command>
   <arg choice="opt" rep="norepeat"><option>-f <replaceable>filename</replaceable></option></arg>
   <arg choice="opt" rep="norepeat"><option>-v <replaceable>loglevel</replaceable></option></arg>
   <arg choice="opt" rep="repeat"><option>-D</option> <replaceable>name=value</replaceable></arg>
   <arg choice="opt" rep="norepeat"><option>-o</option></arg>
   <arg choice="opt" rep="norepeat"><option>-u <replaceable>user</replaceable></option></arg>
   <arg choice="opt" rep="norepeat"><option>-p <replaceable>password</replaceable></option></arg>   
   <arg choice="opt" rep="norepeat"><option>-V</option></arg>
   <arg choice="opt" rep="norepeat">server-addr</arg>
  </cmdsynopsis>
 </refsynopsisdiv>
 
 <refsect1><title>DESCRIPTION</title>
  <para>
   <command moreinfo="none">yaz-illclient</command> is an client which sends an ISO
   ILL request to a remote server and decodes the response from it.
   Exactly one server address ( <replaceable>server-addr</replaceable> )
   must be specified.
  </para>
 </refsect1>
 
 <refsect1><title>OPTIONS</title>
  
  <variablelist>
   <varlistentry>
    <term>-f <replaceable>filename</replaceable>]</term>
    <listitem><para>
      Specify filename.
     </para></listitem>
   </varlistentry>

   <varlistentry>
    <term>-v <replaceable>loglevel</replaceable>]</term>
    <listitem><para>
      Specify the log level
     </para></listitem>
   </varlistentry>

   <varlistentry>
    <term>-D <replaceable>name=value</replaceable>]</term>
    <listitem><para>
      Defines name &amp; value pair.
     </para></listitem>
   </varlistentry>

   <varlistentry>
    <term>-o</term>
    <listitem><para>
      Enable OCLC authentication.
     </para></listitem>
   </varlistentry>

   <varlistentry>
    <term>-u <replaceable>user</replaceable>]</term>
    <listitem><para>
      Specify user.
     </para></listitem>
   </varlistentry>

   <varlistentry>
    <term>-p <replaceable>password</replaceable>]</term>
    <listitem><para>
      Specify password.
     </para></listitem>
   </varlistentry>

   <varlistentry>
    <term>-V</term>
    <listitem><para>
      Show yaz-illclient version.
     </para></listitem>
   </varlistentry>

  </variablelist>
 </refsect1>

 <refsect1><title>EXAMPLES</title>
  <para>
   None yet.
  </para>
 </refsect1> 

 <refsect1><title>FILES</title>
  <para>
   None yet.
  </para>
 </refsect1>
 <refsect1><title>SEE ALSO</title>
  <para>
   yaz(7)
  </para>
 </refsect1>
</refentry>
<!--Generated by stripref.xsl . Do not edit-->
<refentry id="yaz-icu">
 <refentryinfo>
  <productname class="trade">YAZ</productname>
  <productnumber>3.0.28</productnumber>
 </refentryinfo>
 
 <refmeta>
  <refentrytitle>yaz-icu</refentrytitle>
  <manvolnum>1</manvolnum>
 </refmeta>
 
 <refnamediv>
  <refname>yaz-icu</refname>
  <refpurpose>YAZ ICU utility</refpurpose>
 </refnamediv>

 <refsynopsisdiv>
  <cmdsynopsis sepchar=" ">
   <command moreinfo="none">yaz-icu</command>
   <arg choice="opt" rep="repeat">commands</arg>
   <arg choice="opt" rep="norepeat">-c <replaceable>config</replaceable></arg>
   <arg choice="opt" rep="norepeat">-p <replaceable>opt</replaceable></arg>
   <arg choice="opt" rep="norepeat">-x</arg>
  </cmdsynopsis>
 </refsynopsisdiv>
 
 <refsect1><title>DESCRIPTION</title>
  <para>
   <command moreinfo="none">yaz-icu</command> is utility which demonstrates 
   the ICU chain module of yaz. (<filename moreinfo="none">yaz/icu.h</filename>).
  </para>
 </refsect1>

 <refsect1><title>OPTIONS</title>
  <variablelist>
   <varlistentry>
    <term>-c <replaceable>config</replaceable></term>
    <listitem><para>
      Specifies the file containing ICU chain configuration
      which is XML based.
     </para></listitem>
   </varlistentry>

   <varlistentry>
    <term>-p <replaceable>type</replaceable></term>
    <listitem><para>
      Specifies extra information to be printed about the ICU system.
      If <replaceable>type</replaceable> is <literal moreinfo="none">c</literal>
      then ICU converters are printed. 
      If <replaceable>type</replaceable> is <literal moreinfo="none">l</literal>
      available locales are printed.
      If <replaceable>type</replaceable> is <literal moreinfo="none">t</literal>
      available transliterators are printed.
     </para></listitem>
   </varlistentry>

   <varlistentry>
    <term>-x <replaceable>config</replaceable></term>
    <listitem><para>
      Specifies that output should be XML based rather than
      "text" based.
     </para></listitem>
   </varlistentry>

  </variablelist>
 </refsect1>
 <refsect1><title>ICU chain configuration</title>
  <para>
   The ICU chain configuration speicifies one or more rules to convert
   text data into tokens. The configuration format is XML based.
  </para>
  <para>
   The toplevel element must be named <literal moreinfo="none">icu_chain</literal>.
   The <literal moreinfo="none">icu_chain</literal> element has one required attribute
   <literal moreinfo="none">locale</literal> which specifies the ICU locale to be used
   in the conversion steps.
  </para>
  <para>
   The <literal moreinfo="none">icu_chain</literal> element must include elements where
   each element specifies a conversion step. The conversion is performed
   in the order in which the conversion steps are specified.
   Each conversion element takes one attribute: <literal moreinfo="none">rule</literal>
   which serves as argument to the conversion step.
  </para>
  <para>
   The following conversion elements are available:
   
   <variablelist>
    <varlistentry>
     <term>casemap</term>
     <listitem><para>
       Converts case and rule specifies how:

       <variablelist>
	<varlistentry>
	 <term>l</term>
	 <listitem>
	  <para>Lowercase using ICU function u_strToLower. </para>
	 </listitem>
	</varlistentry>

	<varlistentry>
	 <term>u</term>
	 <listitem>
	  <para>Upper case using ICU function u_strToUpper.</para>
	 </listitem>
	</varlistentry>
	
	<varlistentry>
	 <term>t</term>
	 <listitem>
	  <para>To title using UCU function u_strToTitle.</para>
	 </listitem>
	</varlistentry>

	<varlistentry>
	 <term>f</term>
	 <listitem>
	  <para>Fold case using ICU function u_strFoldCase.</para>
	 </listitem>
	</varlistentry>
	
       </variablelist>
      </para></listitem>
    </varlistentry>

    <varlistentry>
     <term>display</term>
     <listitem><para>
       This is a meta step which specifies that a term/token is to
       be displayed. This term is retrieved in an application
       using function icu_chain_token_display (<filename moreinfo="none">yaz/icu.h</filename>).
      </para></listitem>
    </varlistentry>
    
    <varlistentry>
     <term>transform</term>
     <listitem><para>
       Specifies an ICU transform rule. The rule attribute is the
       custom transformation rule to be used. This is a text based format
       which is offered by the ICU transform system. See
       <ulink url="http://www.icu-project.org/userguide/Transform.html">ICU Transforms</ulink> for
       more information.
      </para></listitem>
    </varlistentry>
    
    <varlistentry>
     <term>tokenize</term>
     <listitem><para>
       Breaks / tokenizes a string into components using
       ICU functions ubrk_open, ubrk_setText, .. . The rule is
       one of:
       <variablelist>
	<varlistentry>
	 <term>l</term>
	 <listitem>
	  <para>Line. ICU: UBRK_LINE.</para>
	 </listitem>
	</varlistentry>

	<varlistentry>
	 <term>s</term>
	 <listitem>
	  <para>Sentence. ICU: UBRK_SENTENCE.</para>
	 </listitem>
	</varlistentry>
	
	<varlistentry>
	 <term>w</term>
	 <listitem>
	  <para>Word. ICU: UBRK_WORD.</para>
	 </listitem>
	</varlistentry>

	<varlistentry>
	 <term>c</term>
	 <listitem>
	  <para>Character. ICU: UBRK_CHARACTER.</para>
	 </listitem>
	</varlistentry>

	<varlistentry>
	 <term>t</term>
	 <listitem>
	  <para>Title. ICU: UBRK_TITLE.</para>
	 </listitem>
	</varlistentry>

       </variablelist>
      </para></listitem>
    </varlistentry>
    
   </variablelist>
   
  </para>
 </refsect1>
 <refsect1><title>EXAMPLES</title>
  <para>
   The following command analyzes text in file <filename moreinfo="none">text</filename>
   using ICU chain configuration <filename moreinfo="none">chain.xml</filename>:
   <screen format="linespecific">
    cat text | yaz-icu -c chain.xml
   </screen>
   The chain.xml might look as follows:
    <screen format="linespecific">
&lt;icu_chain locale="en"&gt;
  &lt;transform rule="[:Control:] Any-Remove"/&gt;
  &lt;tokenize rule="w"/&gt;
  &lt;transform rule="[[:WhiteSpace:][:Punctuation:]] Remove"/&gt;
  &lt;display/&gt;
  &lt;casemap rule="l"/&gt;
&lt;/icu_chain&gt;

   </screen>
  </para>
 </refsect1>
 <refsect1><title>SEE ALSO</title>
  <para>
   <citerefentry>
    <refentrytitle>yaz</refentrytitle>
    <manvolnum>7</manvolnum>
   </citerefentry>
  </para>
  <para>
   <ulink url="http://www.icu-project.org/">ICU Home</ulink>
  </para>
  <para>
   <ulink url="http://www.icu-project.org/userguide/Transform.html">ICU Transforms</ulink>
  </para>
 </refsect1>
</refentry>