File: manref.xml

package info (click to toggle)
yaz 5.37.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 16,568 kB
  • sloc: xml: 124,223; ansic: 73,221; sh: 5,738; tcl: 2,189; makefile: 1,274; yacc: 382
file content (4039 lines) | stat: -rw-r--r-- 139,804 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
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
<!--Generated by stripref.xsl . Do not edit-->
<refentry id="yaz-client">
 <refentryinfo>
  <productname class="trade">YAZ</productname>
  <productnumber>5.37.0</productnumber>
  <orgname>Index Data</orgname>
 </refentryinfo>

 <refmeta>
  <refentrytitle>yaz-client</refentrytitle>
  <manvolnum>1</manvolnum>
  <refmiscinfo class="manual">Commands</refmiscinfo>
 </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>apdulog</replaceable></option></arg>
   <arg choice="opt" rep="norepeat"><option>-b <replaceable>berdump</replaceable></option></arg>
   <arg choice="opt" rep="norepeat"><option>-c <replaceable>cclfile</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>marclog</replaceable></option></arg>
   <arg choice="opt" rep="norepeat"><option>-p <replaceable>proxy-addr</replaceable></option></arg>
   <arg choice="opt" rep="norepeat"><option>-q <replaceable>cqlfile</replaceable></option></arg>
   <arg choice="opt" rep="norepeat"><option>-t <replaceable>dispcharset</replaceable></option></arg>
   <arg choice="opt" rep="norepeat"><option>-u <replaceable>auth</replaceable></option></arg>
   <arg choice="opt" rep="norepeat"><option>-v <replaceable>loglevel</replaceable></option></arg>
   <arg choice="opt" rep="norepeat"><option>-V</option></arg>
   <arg choice="opt" rep="norepeat"><option>-x</option></arg>
   <arg choice="opt" rep="norepeat">server-addr</arg>
  </cmdsynopsis>

 </refsynopsisdiv>

 <refsect1><title>DESCRIPTION</title>
  <para>
   <command moreinfo="none">yaz-client</command> is a
   <ulink url="https://www.loc.gov/z3950/agency/">Z39.50</ulink>/<ulink url="https://www.loc.gov/standards/sru/">SRU</ulink>
   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>
   From YAZ version 4.1.0 <command moreinfo="none">yaz-client</command> may also operate as a
   <ulink url="https://solr.apache.org">Solr</ulink> Web Service
   client.
  </para>
  <para>
   If the <replaceable>server-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> environment variable 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
       to the 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 <filename moreinfo="none">.yazclientrc</filename>
      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 65536 (64 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>proxy-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 the 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>-t <replaceable>displaycharset</replaceable></term>
     <listitem><para>
       If displaycharset is given, it specifies name of the character set of the
       output (on the terminal on which YAZ client is running).
      </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>
  <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 command overrides
      the database given in <replaceable>zurl</replaceable>.
     </para>
    </listitem>
   </varlistentry>
   <varlistentry><term>
     <literal moreinfo="none">show </literal>
     [<replaceable>start</replaceable>[+<replaceable>number</replaceable>
     [+<replaceable>resultset</replaceable>]]]
    </term>
    <listitem>
     <para>Fetches records by sending a Present Request from the start
      position given by
      <replaceable>start</replaceable>
      and a number of records given by <replaceable>number</replaceable>,
      from the result set <replaceable>resultset</replaceable>.  If
      <replaceable>start</replaceable> is not given, then the client
      will fetch from the position of the last retrieved record plus 1. If
      <replaceable>number</replaceable> is not given, then one record will
      be fetched at a time. If <replaceable>resultset</replaceable> is not
      given, the most recently retrieved result set is used.
     </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 the 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 the 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> character 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>
     <para>
      Example using sort criterion with attributes use=local-number
      and structure=numeric and ascending flag:
      <literal moreinfo="none">1=12,4=109 &lt;</literal>
     </para>
     <para>
      Another example with "Title" sort field and descending flag:
      <literal moreinfo="none">Title &gt;</literal>
     </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>auth1</replaceable> [<replaceable>auth2</replaceable> [<replaceable>auth3</replaceable>]]]
    </term>
    <listitem>
     <para>Configures authentication strings to be sent to server. Zero, 1, 2 or 3 arguments may follow the
     auth command.
     </para>
     <para>If no (0) arguments are given, no authentication string is sent.</para>
     <para>If one argument is given, the Z39.50 v2 OpenStyle authentication is used.
      A common convention for the <replaceable>auth1</replaceable> string
      is that the username and password is separated by a slash, e.g.
      <literal moreinfo="none">myusername/mysecret</literal>.
     </para>
     <para>
      If two or more arguments is given Z39.50 v3 authentication is used, in which cased the
      first argument is used, second argument is group and third argument is password. If only two arguments are given
      the group is assumed to be empty.
     </para>
     <para>
      As for other commands in yaz-client, the arguments are separated by whitespace. A backslash character can be used to include
      a character verbatim. For example, <literal moreinfo="none">auth myuser a\ b</literal> is a two argument auth command where user is
      <literal moreinfo="none">myuser</literal> and password is <literal moreinfo="none">a b</literal>.
     </para>
     <para>
     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.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry><term>
     <literal moreinfo="none">sru</literal> <replaceable>method</replaceable> <replaceable>version</replaceable>
    </term>
    <listitem>
     <para>Selects Web Service method and version.
      Must be one of <literal moreinfo="none">post</literal>,
      <literal moreinfo="none">get</literal>, <literal moreinfo="none">soap</literal> (default)
      or <literal moreinfo="none">solr</literal>. Version
      should be either 1.1, 1.2 or 2.0 for SRU.
      Other versions are allowed - for testing
      purposes (version negotiation with SRU server).
      The version is currently not used for Solr Web Services
     </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 on set bounds
      </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 on set bounds
      </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 that 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 on set bounds
      </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">facets</literal> <replaceable>spec</replaceable>
    </term>
    <listitem>
     <para>
       Specifies requested facets to be used in search. The notation
       is specified in <xref linkend="facets"/>.
     </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 Record Syntax Identifiers
      </ulink>
      for more details. Commonly used records syntaxes include usmarc,
      sutrs 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 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 preceded with
      "&lt;", then the following characters are treated as a filename
      with the records to be updated. Otherwise doc is treated as
      a document itself. The doc may also be quoted in double quotes.
      If doc is omitted, the last received record (as part 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 reconnects if the
      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 (<literal moreinfo="none">on</literal>) 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
      same 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>marccharset</replaceable> is given, it specifies name
      of the character set of retrieved MARC records from server. See
      also <literal moreinfo="none">marccharset</literal> command.
     </para>
     <note>
      <para>
       Since character set negotiation 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 conversion(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
      same 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
      same 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 of: <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>
 </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 were specified.
   This leaves it up to the server what fields to search but
   most servers will search in all fields. Some servers do 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>
   <citerefentry>
    <refentrytitle>bib1-attr</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>5.37.0</productnumber>
  <orgname>Index Data</orgname>
 </refentryinfo>

 <refmeta>
  <refentrytitle>yaz-ztest</refentrytitle>
  <manvolnum>8</manvolnum>
  <refmiscinfo class="manual">System management commands</refmiscinfo>
 </refmeta>

 <refnamediv>
  <refname>yaz-ztest</refname>
  <refpurpose>Z39.50/SRU 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>-K</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>-ziDSTV1</option></arg>
 <arg choice="opt" rep="repeat">listener-spec</arg>
</cmdsynopsis>
<!-- Keep this comment at the end of the file
Local variables:
mode: nxml
nxml-child-indent: 1
End:
-->

 </refsynopsisdiv>
 <refsect1><title>DESCRIPTION</title>
  <para>
   <command moreinfo="none">yaz-ztest</command> is a Z39.50/SRU test server that uses
   the YAZ generic front-end server (GFS) API.
   The server acts as a real Z39.50/SRU 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 fork a process. Only available
   on UNIX systems that offer 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 before listening
   to 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 the
  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 the server as an NT service and mark it as "auto-start.
   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">-K</literal></term>
  <listitem><para>
   Forces no-keepalive for HTTP sessions. By default GFS will keep
   sessions alive for HTTP 1.1 sessions (as defined by the standard).
   Using this option will force GFS to close the connection for each
   operation.
  </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>
 <varlistentry>
  <term><literal moreinfo="none">-V </literal></term>
  <listitem><para>
   Display YAZ version and exit.
  </para></listitem>
 </varlistentry>
</variablelist>

<!-- Keep this comment at the end of the file
Local variables:
mode: nxml
nxml-child-indent: 1
End:
-->

 </refsect1>
 <refsect1>
   <title>TESTING</title>
   <para>
    <command moreinfo="none">yaz-ztest</command> normally returns a random hit count between
    0 and 24. However, if a query term includes leading digits, then the
    integer value of that term is used as hit count. This allows testers
    to return any number of hits. <command moreinfo="none">yaz-ztest</command> includes
    24 MARC records for testing. Hit counts exceeding 24 will make
    <command moreinfo="none">yaz-ztest</command> return the same record batch over and over.
    So record at position 1, 25, 49, etc. are equivalent.
   </para>
   <para>
    For XML, if no element set is given or element has value "marcxml",
    MARCXML is returned (each of the 24 dummy records converted from
    ISO2709 to XML). For element set OP, then OPAC XML is returned.
   </para>
   <para>
    yaz-ztest may also return predefined XML records (for testing).
    This is enabled if <literal moreinfo="none">YAZ_ZTEST_XML_FETCH</literal> environment
    variable is defined. A record is fetched from a file (one record per file).
    The path for the filename is
    <replaceable>F</replaceable><replaceable>E</replaceable><literal moreinfo="none">.</literal><replaceable>d</replaceable><literal moreinfo="none">.xml</literal>
    where <replaceable>F</replaceable> is the YAZ_ZTEST_XML_FETCH value
    (possibly
    empty), <replaceable>E</replaceable> is element-set,
    <replaceable>d</replaceable> is record position (starting from 1).
   </para>
   <para>
     The following databases are honored by <command moreinfo="none">yaz-ztest</command>:
     <literal moreinfo="none">Default</literal>, <literal moreinfo="none">slow</literal>
     and <literal moreinfo="none">db.*</literal> (all databases with prefix "db"). Any
     other database will make <command moreinfo="none">yaz-ztest</command> return diagnostic
     109: "Database unavailable".
   </para>
   <para>
     Options for search may be included in the form or URL get arguments
     included as part of the Z39.50 database name. The following
     database options are present: <literal moreinfo="none">search-delay</literal>,
     <literal moreinfo="none">present-delay</literal>, <literal moreinfo="none">fetch-delay</literal>
     and <literal moreinfo="none">seed</literal>.
   </para>
   <para>
     The former, delay type options, specify
     a fake delay (sleep) that <command moreinfo="none">yaz-ztest</command> will perform
     when searching, presenting, fetching records respectively.
     The value of the delay may either be a fixed floating point
     value which specifies the delay in seconds.
     Alternatively the value may be given as two floating point numbers
     separated by colon, which will make <command moreinfo="none">yaz-ztest</command> perform
     a random sleep between the first and second number.
   </para>
   <para>
     The database parameter <literal moreinfo="none">seed</literal> takes an integer
     as value. This will call <literal moreinfo="none">srand</literal> with this integer to
     ensure that the random behavior can be re-played.
   </para>
   <para>
     Suppose we want searches to take between 0.1 and 0.5 seconds and
     a fetch to take 0.2 second. To access test database Default we'd use:
     <literal moreinfo="none">Default?search-delay=0.1:0.5&amp;fetch-delay=0.2</literal>.
   </para>
 </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 front-end server to
 support multiple back-ends. A back-end is selected on the basis of
 the TCP/IP binding (port+listening address) and/or the virtual host.
</para>
<para>
 A back-end can be configured to execute in a particular working
 directory. Or the YAZ front-end may perform CQL to RPN conversion, thus
 allowing traditional Z39.50 back-ends to be offered as a SRW/SRU
 service. SRW/SRU Explain information for a particular back-end 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 allow the VHOST information to be set.
  For those, the selection of the back-end must rely on the
  TCP/IP information alone (port and address).
 </para>
</note>
<para>
 The YAZ front-end server uses XML to describe the back-end
 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 one or more listeners for this server. Each server ID is
     separated by a comma.
     If this attribute is not given, the server is accessible from all
     listeners. In order for the server to be used for real, however, 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
     specified, the YAZ frontend 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 none is given, then if
     the client does not specify one, then no stylesheet reference is part of the
     SRU HTTP response.
    </para>
   </listitem>
  </varlistentry>

  <varlistentry><term>element <literal moreinfo="none">client_query_charset</literal> (optional)</term>
   <listitem>
    <para>
     If specified, a conversion from the character set given to UTF-8 is
     performed by the generic frontend server. It is only executed for
     Z39.50 search requests (SRU/Solr are assumed to be UTF-8 encoded already).
    </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 (/ excluded) that matches the value of <literal moreinfo="none">docpath</literal>
     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/xsl</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
     seem 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 serves as the 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 to support 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" listenref="public,internal"&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.
 <literal moreinfo="none">"server1"</literal> is reached by all (two) since no
  <literal moreinfo="none">listenref</literal> attribute is specified.
 <literal moreinfo="none">"server2"</literal> is reached by the two listeners specified.
 In order to distinguish between the two, a virtual host has
 been specified for each 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: nxml
nxml-child-indent: 1
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>5.37.0</productnumber>
  <orgname>Index Data</orgname>
 </refentryinfo>

 <refmeta>
  <refentrytitle>yaz-config</refentrytitle>
  <manvolnum>1</manvolnum>
  <refmiscinfo class="manual">Commands</refmiscinfo>
 </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>--include</option></arg>
   <arg choice="opt" rep="norepeat"><option>--comp</option></arg>
   <arg choice="opt" rep="norepeat"><option>-V</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>--include</term>
    <listitem><para>
      Return C compiler includes for YAZ header files (-Ipath).
     </para></listitem>
   </varlistentry>

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

   <varlistentry>
    <term>-V</term>
    <listitem><para>
      Returns YAZ SHA1 ID (from Git) and version.
     </para></listitem>
   </varlistentry>

  </variablelist>
 </refsect1>

 <refsect1><title>FILES</title>
  <para>
   <filename moreinfo="none">/usr/bin/yaz-config</filename>
  </para>
  <para>
   <filename moreinfo="none">/usr/lib/libyaz*.a</filename>
  </para>
  <para>
   <filename moreinfo="none">/usr/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>5.37.0</productnumber>
  <orgname>Index Data</orgname>
 </refentryinfo>

 <refmeta>
  <refentrytitle>yaz</refentrytitle>
  <manvolnum>7</manvolnum>
  <refmiscinfo class="manual">Conventions and miscellaneous</refmiscinfo>
 </refmeta>

 <refnamediv>
  <refname>yaz</refname>
  <refpurpose>Z39.50 toolkit.</refpurpose>
 </refnamediv>

 <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
   Solr (client only) and ILL protocols. The level that you need to use depends
   on your requirements, and the role (server or client) that you want
   to implement.
  </para>
 </refsect1>

 <refsect1><title>COPYRIGHT</title>
  <para>
   Copyright © 1995-2026 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>
    <citerefentry>
     <refentrytitle>bib1-attr</refentrytitle>
     <manvolnum>7</manvolnum>
    </citerefentry>
  </para>
  <para>YAZ manual (
   <filename moreinfo="none">/usr/share/doc/yaz</filename>)
  </para>
  <para>
   <ulink url="https://www.indexdata.com/yaz">YAZ home page</ulink>.
  </para>
  <para>
   <ulink url="https://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>5.37.0</productnumber>
  <orgname>Index Data</orgname>
 </refentryinfo>

 <refmeta>
  <refentrytitle>zoomsh</refentrytitle>
  <manvolnum>1</manvolnum>
  <refmiscinfo class="manual">Commands</refmiscinfo>
 </refmeta>

 <refnamediv>
  <refname>zoomsh</refname>
  <refpurpose>ZOOM shell</refpurpose>
 </refnamediv>

 <refsynopsisdiv>
  <cmdsynopsis sepchar=" ">
   <command moreinfo="none">zoomsh</command>
   <arg choice="opt" rep="norepeat"><option>-a <replaceable>apdufile</replaceable></option></arg>
   <arg choice="opt" rep="norepeat"><option>-e</option></arg>
   <arg choice="opt" rep="norepeat"><option>-v <replaceable>loglevel</replaceable></option></arg>
   <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>OPTIONS</title>
   <variablelist>
    <varlistentry>
     <term>-a <replaceable>apdufile</replaceable></term>
     <listitem><para>
      Logs protocol packages into apdufile (APDU log).
      </para></listitem>
    </varlistentry>
    <varlistentry>
     <term>-e</term>
     <listitem><para>
      Makes zoomsh stop processing commands as soon as an error occur.
      The exit code of zoomsh is 1 if error occurs; 0 otherwise.
      </para></listitem>
    </varlistentry>
    <varlistentry>
     <term>-v <replaceable>loglevel</replaceable></term>
     <listitem><para>
       Sets YAZ log level to <replaceable>loglevel</replaceable>.
      </para></listitem>
    </varlistentry>
   </variablelist>
  </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>5.37.0</productnumber>
  <orgname>Index Data</orgname>
 </refentryinfo>

 <refmeta>
  <refentrytitle>yaz-asncomp</refentrytitle>
  <manvolnum>1</manvolnum>
  <refmiscinfo class="manual">Commands</refmiscinfo>
 </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 DEFINITIONS 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 consist 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 two 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>5.37.0</productnumber>
  <orgname>Index Data</orgname>
 </refentryinfo>

 <refmeta>
  <refentrytitle>yaz-marcdump</refentrytitle>
  <manvolnum>1</manvolnum>
  <refmiscinfo class="manual">Commands</refmiscinfo>
 </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>-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>-O <replaceable>offset</replaceable></option></arg>
   <arg choice="opt" rep="norepeat"><option>-L <replaceable>limit</replaceable></option></arg>
   <arg choice="opt" rep="norepeat"><option>-n</option></arg>
   <arg choice="opt" rep="norepeat"><option>-p</option></arg>
   <arg choice="opt" rep="norepeat"><option>-r</option></arg>
   <arg choice="opt" rep="norepeat"><option>-v</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-marcdump</command> reads MARC records from one or
   more files.
   It parses each record and supports output in line-format,
   ISO2709,
   <ulink url="https://loc.gov/standards/marcxml/">MARCXML</ulink>,
   <ulink url="https://rossfsinger.com/blog/2010/09/a-proposal-to-serialize-marc-in-json/">MARC-in-JSON</ulink>,
   <ulink url="https://loc.gov/standards/iso25577/">MarcXchange</ulink>
   as well as Hex output.
  </para>
  <para>
   This utility parses records ISO2709(raw MARC), line format, MARC-in-JSON
   format as well as XML if that is structured as MARCXML/MarcXchange.
  </para>
  <para>
   MARC-in-JSON encoding/decoding is supported in YAZ 5.0.5 and later.
  </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 sub-field 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),
      <literal moreinfo="none">turbomarc</literal> (Turbo MARC),
      or <literal moreinfo="none">json</literal> (MARC-in-JSON).
     </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),
      <literal moreinfo="none">turbomarc</literal> (Turbo MARC),
      or <literal moreinfo="none">json</literal> (MARC-in-JSON).
     </para></listitem>
   </varlistentry>

   <varlistentry>
    <term>-f <replaceable>from</replaceable></term>
    <listitem><para>
      Specify the character set
      of the input MARC record.
      Should be used in conjunction with option <literal moreinfo="none">-t</literal>.
      Refer to the yaz-iconv man page for supported character sets.
     </para></listitem>
   </varlistentry>

   <varlistentry>
    <term>-t <replaceable>to</replaceable></term>
    <listitem><para>
      Specify the character set
      of the output.
      Should be used in conjunction with option <literal moreinfo="none">-f</literal>.
      Refer to the yaz-iconv man page for supported character sets.
     </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>-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 records 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>-O <replaceable>offset</replaceable></term>
    <listitem><para>
     Integer offset for at what position records whould be
     written. 0=first record, 1=second, .. With -L option, this
     allows a specific range of records to be processed.
     </para></listitem>
   </varlistentry>

   <varlistentry>
    <term>-L <replaceable>limit</replaceable></term>
    <listitem><para>
     Integer limit for how many records should at most be written.
     With -O option, this allows a specific range of records to be
     processed.
     </para></listitem>
   </varlistentry>

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

   <varlistentry>
    <term>-n</term>
    <listitem><para>
      MARC output is omitted so that MARC input is only checked.
     </para></listitem>
   </varlistentry>

   <varlistentry>
    <term>-r</term>
    <listitem><para>
      Writes to stderr a summary about number of records read by
      yaz-marcdump.
     </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>-V</term>
    <listitem><para>
      Prints YAZ version.
     </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>

  <para>
   Turbo MARC is a compact XML notation with same semantics as
   MARCXML, but which allows for faster processing via XSLT. In order
   to generate Turbo MARC records encoded in UTF-8 from MARC21 (ISO), one
   could use:
   <screen format="linespecific">
    yaz-marcdump -f MARC8 -t UTF8 -o turbomarc -i marc marc21.raw &gt;out.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>
   <citerefentry>
    <refentrytitle>yaz</refentrytitle>
    <manvolnum>7</manvolnum>
   </citerefentry>
  </para>
  <para>
   <citerefentry>
    <refentrytitle>yaz-iconv</refentrytitle>
    <manvolnum>1</manvolnum>
   </citerefentry>
  </para>
 </refsect1>
</refentry>
<!--Generated by stripref.xsl . Do not edit-->
<refentry id="yaz-iconv">
 <refentryinfo>
  <productname class="trade">YAZ</productname>
  <productnumber>5.37.0</productnumber>
  <orgname>Index Data</orgname>
 </refentryinfo>

 <refmeta>
  <refentrytitle>yaz-iconv</refentrytitle>
  <manvolnum>1</manvolnum>
  <refmiscinfo class="manual">Commands</refmiscinfo>
 </refmeta>

 <refnamediv>
  <refname>yaz-iconv</refname>
  <refpurpose>YAZ Character 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 the character
   set specified by <replaceable>from</replaceable> to output in
   the character set as specified by <replaceable>to</replaceable>.
  </para>
  <para>
   This <command moreinfo="none">yaz-iconv</command> utility is 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>ENCODINGS</title>
  <para>
   The yaz-iconv command and the API as defined in
   <filename moreinfo="none">yaz/yaz-iconv.h</filename> is a wrapper for the
   library system call iconv. But YAZ' iconv utility also implements
   conversions on its own. The table below lists characters sets (or encodings)
   that are supported by YAZ. Each character set is marked with either
   <emphasis>encode</emphasis> or <emphasis>decode</emphasis>. If
   an encoding is encode-enabled, YAZ may convert <emphasis>to</emphasis>
   the designated encoding. If an encoding is decode-enabled, YAZ
   may convert <emphasis>from</emphasis> the designated encoding.
  </para>
  <variablelist>
   <varlistentry>
    <term>marc8 (encode, decode)</term>
    <listitem>
     <para>
      The <ulink url="https://loc.gov/marc/specifications/speccharmarc8.html">MARC8</ulink> encoding as defined by
      the Library of Congress. Most MARC21/USMARC records use this encoding.
     </para>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>marc8s (encode, decode)</term>
    <listitem>
     <para>
      Like MARC8 but conversion prefers non-combined characters
      in the Latin-1 plane over combined characters.
     </para>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>marc8lossy (encode)</term>
    <listitem>
     <para>
      Lossy encoding of MARC-8.
     </para>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>marc8lossless (encode)</term>
    <listitem>
     <para>
      Lossless encoding of MARC8.
     </para>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>utf8 (encode, decode)</term>
    <listitem>
     <para>
      The most commonly used UNICODE encoding on the Internet.
     </para>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>iso8859-1 (encode, decode)</term>
    <listitem>
     <para>
      ISO-8859-1, AKA Latin-1.
     </para>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>iso5426 (decode)</term>
    <listitem>
     <para>
      ISO 5426. Some MARC records (UNIMARC) use this encoding.
     </para>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>iso5428:1984 (encode, decode)</term>
    <listitem>
     <para>
      ISO 5428:1984.
     </para>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>advancegreek (encode, decode)</term>
    <listitem>
     <para>
      An encoding for Greek in use by some vendors (Advance).
     </para>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>danmarc (decode)</term>
    <listitem>
     <para>
      <ulink url="https://www.kat-format.dk/danMARC2/Danmarc2.4.htm">Danmarc (in danish)</ulink> is
      an encoding based on UNICODE which is used for DanMARC2 records.
     </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 &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>5.37.0</productnumber>
  <orgname>Index Data</orgname>
 </refentryinfo>

 <refmeta>
  <refentrytitle>yaz-log</refentrytitle>
  <manvolnum>7</manvolnum>
  <refmiscinfo class="manual">Conventions and miscellaneous</refmiscinfo>
 </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 (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, rotation 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>5.37.0</productnumber>
  <orgname>Index Data</orgname>
 </refentryinfo>

 <refmeta>
  <refentrytitle>yaz-illclient</refentrytitle>
  <manvolnum>1</manvolnum>
  <refmiscinfo class="manual">Commands</refmiscinfo>
 </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 a 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>5.37.0</productnumber>
  <orgname>Index Data</orgname>
 </refentryinfo>

 <refmeta>
  <refentrytitle>yaz-icu</refentrytitle>
  <manvolnum>1</manvolnum>
  <refmiscinfo class="manual">Commands</refmiscinfo>
 </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="norepeat">-c <replaceable>config</replaceable></arg>
   <arg choice="opt" rep="norepeat">-p <replaceable>opt</replaceable></arg>
   <arg choice="opt" rep="norepeat">-s</arg>
   <arg choice="opt" rep="norepeat">-x</arg>
   <arg choice="opt" rep="norepeat">infile</arg>
  </cmdsynopsis>
 </refsynopsisdiv>

 <refsect1><title>DESCRIPTION</title>
  <para>
   <command moreinfo="none">yaz-icu</command> is a utility which demonstrates
   the ICU chain module of yaz. (<filename moreinfo="none">yaz/icu.h</filename>).
  </para>
  <para>
    The utility can be used in two ways. It may read some text
    using an XML configuration for configuring ICU and show text analysis.
    This mode is triggered by option <literal moreinfo="none">-c</literal> which specifies
    the configuration to be used. The input file is read from standard
    input or from a file if <literal moreinfo="none">infile</literal> is specified.
  </para>
  <para>
    The utility may also show ICU information. This is triggered by
    option <literal moreinfo="none">-p</literal>.
  </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>,
      then available locales are printed.
      If <replaceable>type</replaceable> is <literal moreinfo="none">t</literal>,
      then available transliterators are printed.
     </para></listitem>
   </varlistentry>

   <varlistentry>
    <term>-s</term>
    <listitem><para>
      Specifies that output should include sort key as well. Note that
      sort key differs between ICU versions.
     </para></listitem>
   </varlistentry>

   <varlistentry>
    <term>-x</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 specifies 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>Lower case 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 ICU 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 using a transliterator
       Identifier.
       The rule attribute is the transliterator Identifier.
       See  <ulink url="https://unicode-org.github.io/icu/userguide/transforms/general/">ICU Transforms</ulink> for
       more information.
      </para></listitem>
    </varlistentry>

    <varlistentry>
     <term>transliterate</term>
     <listitem><para>
       Specifies a rule-based transliterator.
       The rule attribute is the custom transformation rule to be used.
       See <ulink url="https://unicode-org.github.io/icu/userguide/transforms/general/">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>

    <varlistentry>
     <term>join</term>
     <listitem>
      <para>
       Joins tokens into one string. The rule attribute is the joining
       string, which may be empty. The join conversion element was added
       in YAZ 4.2.49.
      </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;transliterate rule="xy &gt; z;"/&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="https://github.com/unicode-org/icu">ICU Home</ulink>
  </para>
  <para>
   <ulink url="https://unicode-org.github.io/icu/userguide/transforms/general/">ICU Transforms</ulink>
  </para>
 </refsect1>
</refentry>
<!--Generated by stripref.xsl . Do not edit-->
<refentry id="yaz-url">
 <refentryinfo>
  <productname class="trade">YAZ</productname>
  <productnumber>5.37.0</productnumber>
  <orgname>Index Data</orgname>
 </refentryinfo>

 <refmeta>
  <refentrytitle>yaz-url</refentrytitle>
  <manvolnum>1</manvolnum>
  <refmiscinfo class="manual">Commands</refmiscinfo>
 </refmeta>

 <refnamediv>
  <refname>yaz-url</refname>
  <refpurpose>YAZ URL fetch utility</refpurpose>
 </refnamediv>

 <refsynopsisdiv>
  <cmdsynopsis sepchar=" ">
   <command moreinfo="none">yaz-url</command>
   <arg choice="opt" rep="norepeat">-H <replaceable>name:value</replaceable></arg>
   <arg choice="opt" rep="norepeat">-m <replaceable>method</replaceable></arg>
   <arg choice="opt" rep="norepeat">-O <replaceable>fname</replaceable></arg>
   <arg choice="opt" rep="norepeat">-p <replaceable>fname</replaceable></arg>
   <arg choice="opt" rep="norepeat">-R <replaceable>num</replaceable></arg>
   <arg choice="opt" rep="norepeat">-u <replaceable>user/password</replaceable></arg>
   <arg choice="opt" rep="norepeat">-v</arg>
   <arg choice="opt" rep="norepeat">-x <replaceable>proxy</replaceable></arg>
   <arg rep="repeat" choice="opt">url</arg>
  </cmdsynopsis>
 </refsynopsisdiv>

 <refsect1><title>DESCRIPTION</title>
  <para>
   <command moreinfo="none">yaz-url</command> is utility to get web content. It is very
   limited in functionality compared to programs such as curl, wget.
  </para>
  <para>
   The options must precede the URL given on the command line, to take
   effect.
  </para>
  <para>
   Fetched HTTP content is written to stdout, unless option -O is given.
  </para>
 </refsect1>

 <refsect1><title>OPTIONS</title>
  <variablelist>
   <varlistentry>
    <term>-H <replaceable>name:value</replaceable></term>
    <listitem><para>
      Specifies HTTP header content with name and value. This
      option can be given multiple times (for different names,
      of course).
     </para></listitem>
   </varlistentry>

   <varlistentry>
    <term>-m <replaceable>method</replaceable></term>
    <listitem><para>
      Specifies the HTTP method to be used for the next URL.
      Default is method "GET". However, option -p sets it to "POST".
     </para></listitem>
   </varlistentry>

   <varlistentry>
    <term>-O <replaceable>fname</replaceable></term>
    <listitem><para>
      Sets output filename for HTTP content.
     </para></listitem>
   </varlistentry>

   <varlistentry>
    <term>-p <replaceable>fname</replaceable></term>
    <listitem><para>
      Sets a file to be POSTed in the following URL.
     </para></listitem>
   </varlistentry>

   <varlistentry>
    <term>-R <replaceable>num</replaceable></term>
    <listitem><para>
      Sets maximum number of HTTP redirects to be followed.
      A value of zero disables follow of HTTP redirects.
     </para></listitem>
   </varlistentry>

   <varlistentry>
    <term>-u <replaceable>user/password</replaceable></term>
    <listitem><para>
      Specifies a user and a password to be used in HTTP
      basic authentication in the following URL fetch. The user
      and password must be separated by a slash (thus it is not
      possible to specify a user with a slash in it).
     </para></listitem>
   </varlistentry>

   <varlistentry>
    <term>-v</term>
    <listitem><para>
      Makes yaz-url dump each HTTP request/response to stdout.
     </para></listitem>
   </varlistentry>

   <varlistentry>
    <term>-x <replaceable>proxy</replaceable></term>
    <listitem><para>
      Specifies a proxy to be used for URL fetch.
     </para></listitem>
   </varlistentry>

  </variablelist>
 </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="bib1">
 <refentryinfo>
  <productname class="trade">YAZ</productname>
  <productnumber>5.37.0</productnumber>
  <orgname>Index Data</orgname>
 </refentryinfo>

 <refmeta>
  <refentrytitle>Bib-1 Attribute Set</refentrytitle>
  <manvolnum>7</manvolnum>
  <refmiscinfo class="manual">Conventions and miscellaneous</refmiscinfo>
 </refmeta>

 <refnamediv>
  <refname>bib1-attr</refname>
  <refpurpose>Bib-1 Attribute Set</refpurpose>
 </refnamediv>

 <refsect1><title>DESCRIPTION</title>
  <para>
   This reference entry lists the Bib-1 attribute set types and values.
  </para>
 </refsect1>

 <refsect1><title>TYPES</title>
  <para>
   The Bib-1 attribute set defines six attribute types: Use (1), Relation (2),
   Position (3), Structure (4), Truncation (5) and Completeness (6).
  </para>
 </refsect1>

 <refsect1><title>USE (1)</title>
  <para>
   <screen format="linespecific">
    1     Personal-name
    2     Corporate-name
    3     Conference-name
    4     Title
    5     Title-series
    6     Title-uniform
    7     ISBN
    8     ISSN
    9     LC-card-number
    10    BNB-card-number
    11    BGF-number
    12    Local-number
    13    Dewey-classification
    14    UDC-classification
    15    Bliss-classification
    16    LC-call-number
    17    NLM-call-number
    18    NAL-call-number
    19    MOS-call-number
    20    Local-classification
    21    Subject-heading
    22    Subject-Rameau
    23    BDI-index-subject
    24    INSPEC-subject
    25    MESH-subject
    26    PA-subject
    27    LC-subject-heading
    28    RVM-subject-heading
    29    Local-subject-index
    30    Date
    31    Date-of-publication
    32    Date-of-acquisition
    33    Title-key
    34    Title-collective
    35    Title-parallel
    36    Title-cover
    37    Title-added-title-page
    38    Title-caption
    39    Title-running
    40    Title-spine
    41    Title-other-variant
    42    Title-former
    43    Title-abbreviated
    44    Title-expanded
    45    Subject-precis
    46    Subject-rswk
    47    Subject-subdivision
    48    Number-natl-biblio
    49    Number-legal-deposit
    50    Number-govt-pub
    51    Number-music-publisher
    52    Number-db
    53    Number-local-call
    54    Code-language
    55    Code-geographic
    56    Code-institution
    57    Name-and-title
    58    Name-geographic
    59    Place-publication
    60    CODEN
    61    Microform-generation
    62    Abstract
    63    Note
    1000  Author-title
    1001  Record-type
    1002  Name
    1003  Author
    1004  Author-name-personal
    1005  Author-name-corporate
    1006  Author-name-conference
    1007  Identifier-standard
    1008  Subject-LC-childrens
    1009  Subject-name-personal
    1010  Body-of-text
    1011  Date/time-added-to-db
    1012  Date/time-last-modified
    1013  Authority/format-id
    1014  Concept-text
    1015  Concept-reference
    1016  Any
    1017  Server-choice
    1018  Publisher
    1019  Record-source
    1020  Editor
    1021  Bib-level
    1022  Geographic-class
    1023  Indexed-by
    1024  Map-scale
    1025  Music-key
    1026  Related-periodical
    1027  Report-number
    1028  Stock-number
    1030  Thematic-number
    1031  Material-type
    1032  Doc-id
    1033  Host-item
    1034  Content-type
    1035  Anywhere
    1036  Author-Title-Subject
   </screen>
  </para>
 </refsect1>

 <refsect1><title>RELATION (2)</title>
  <para>
   <screen format="linespecific">
    1 Less than
    2 Less than or equal
    3 Equal
    4 Greater or equal
    5 Greater than
    6 Not equal
    100 Phonetic
    101 Stem
    102 Relevance
    103 AlwaysMatches
   </screen>
  </para>
 </refsect1>

 <refsect1><title>POSITION (3)</title>
  <para>
   <screen format="linespecific">
    1 First in field
    2 First in subfield
    3 Any position in field
   </screen>
  </para>
 </refsect1>

 <refsect1><title>STRUCTURE (4)</title>
  <para>
   <screen format="linespecific">
    1 Phrase
    2 Word
    3 Key
    4 Year
    5 Date (normalized)
    6 Word list
    100 Date (un-normalized)
    101 Name (normalized)
    102 Name (un-normalized)
    103 Structure
    104 Urx
    105 Free-form-text
    106 Document-text
    107 Local-number
    108 String
    109 Numeric-string
   </screen>
  </para>
 </refsect1>

 <refsect1><title>TRUNCATION (5)</title>
  <para>
   <screen format="linespecific">
    1 Right truncation
    2 Left truncation
    3 Left and right truncation
    100 Do not truncate
    101 Process # in search term  . regular #=.*
    102 RegExpr-1
    103 RegExpr-2
    104 Process # ?n . regular: #=., ?n=.{0,n} or ?=.* Z39.58
   </screen>
   </para>
  <para>
    The 105-106 truncation attributes below are only supported by
    Index Data's Zebra server.
    <screen format="linespecific">
    105 Process * ! regular: *=.*, !=. and right truncate
    106 Process * ! regular: *=.*, !=.
   </screen>
  </para>
 </refsect1>

 <refsect1><title>COMPLETENESS (6)</title>
  <para>
   <screen format="linespecific">
    1 Incomplete subfield
    2 Complete subfield
    3 Complete field
   </screen>
  </para>
 </refsect1>

 <refsect1><title>SORTING (7)</title>
  <para>
   <screen format="linespecific">
    1 ascending
    2 descending
   </screen>
  </para>
  <para>
    Type 7 is an Index Data extension to RPN queries that allows
    embedding a sort critieria into a query.
  </para>
 </refsect1>


 <refsect1><title>SEE ALSO</title>
  <para>
   <ulink url="https://www.loc.gov/z3950/agency/defns/bib1.html">Bib-1 Attribute Set</ulink>
  </para>
  <para>
   <ulink url="http://www.loc.gov/z3950/agency/bib1.html">Attribute
    Set Bib-1 Semantics</ulink>.
  </para>
 </refsect1>
</refentry>
<!--Generated by stripref.xsl . Do not edit-->
<refentry id="yaz-json-parse">
 <refentryinfo>
  <productname class="trade">YAZ</productname>
  <productnumber>5.37.0</productnumber>
  <orgname>Index Data</orgname>
 </refentryinfo>

 <refmeta>
  <refentrytitle>yaz-json-parse</refentrytitle>
  <manvolnum>1</manvolnum>
  <refmiscinfo class="manual">Commands</refmiscinfo>
 </refmeta>

 <refnamediv>
  <refname>yaz-json-parse</refname>
  <refpurpose>YAZ JSON parser</refpurpose>
 </refnamediv>

 <refsynopsisdiv>
  <cmdsynopsis sepchar=" ">
   <command moreinfo="none">yaz-json-parse</command>
   <arg choice="opt" rep="norepeat">-p</arg>
  </cmdsynopsis>
 </refsynopsisdiv>

 <refsect1><title>DESCRIPTION</title>
  <para>
   <command moreinfo="none">yaz-json-parse</command> is a utility which demonstrates
   the JSON API of YAZ. (<filename moreinfo="none">yaz/json.h</filename>).
  </para>
  <para>
   The program attempts to parse a JSON from standard input (stdin).
   It will return exit code 1 if parsing fails and the parsing error message
   will be printed to standard error (stderr). The program returns exit code
   0 if parsing succeeds, and returns no output unless -p is given (see below).
  </para>
 </refsect1>

 <refsect1><title>OPTIONS</title>
  <variablelist>
   <varlistentry>
    <term>-p</term>
    <listitem><para>
      Makes the JSON parser echo the JSON result string to standard output,
      if parsing from stdin was successful. If -p is given twice, then the
      output is a multi-line output with indentation (pretty print).
     </para></listitem>
   </varlistentry>

  </variablelist>
 </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-record-iconv">
 <refentryinfo>
  <productname class="trade">YAZ</productname>
  <productnumber>5.37.0</productnumber>
  <orgname>Index Data</orgname>
 </refentryinfo>

 <refmeta>
  <refentrytitle>yaz-record-iconv</refentrytitle>
  <manvolnum>1</manvolnum>
  <refmiscinfo class="manual">Commands</refmiscinfo>
 </refmeta>

 <refnamediv>
  <refname>yaz-record-conv</refname>
  <refpurpose>YAZ Record Conversion Utility</refpurpose>
 </refnamediv>

 <refsynopsisdiv>
  <cmdsynopsis sepchar=" ">
   <command moreinfo="none">yaz-record-conv</command>
   <arg choice="opt" rep="norepeat">
    <option>-v <replaceable>loglevel</replaceable></option>
   </arg>
   <arg choice="opt" rep="norepeat"><replaceable>config</replaceable></arg>
   <arg choice="opt" rep="repeat"><replaceable>fname</replaceable></arg>
  </cmdsynopsis>
 </refsynopsisdiv>

 <refsect1>
  <title>DESCRIPTION</title>
  <para>
   <command moreinfo="none">yaz-record-conv</command> is a program that exercises the
   record conversion sub system. Refer to record_conv.h header.
  </para>
 </refsect1>

 <refsect1>
  <title>OPTIONS</title>
  <variablelist>
   <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>
  </variablelist>
 </refsect1>

 <refsect1><title>EXAMPLES</title>
 <para>
  The following backend configuration converts MARC records (ISO2709) to
  Dublin-Core XML.
 </para>
 <programlisting format="linespecific">
    &lt;backend name="F" syntax="usmarc"&gt;
      &lt;marc inputcharset="marc-8" inputformat="marc" outputformat="marcxml"/&gt;
      &lt;xslt stylesheet="../etc/MARC21slim2DC.xsl"/&gt;
    &lt;/backend&gt;
    
 </programlisting>
 <para>
  We can convert one of the sample records from YAZ' test directory with:
  <programlisting format="linespecific">
$ ../util/yaz-record-conv record-conv-conf.xml marc6.marc
&lt;?xml version="1.0"?&gt;
&lt;dc:dc xmlns:dc="http://purl.org/dc/elements/1.1/"&gt;
  &lt;dc:title&gt;How to program a computer&lt;/dc:title&gt;
  &lt;dc:creator&gt;
    Jack Collins
  &lt;/dc:creator&gt;
  &lt;dc:type&gt;text&lt;/dc:type&gt;
  &lt;dc:publisher&gt;Penguin&lt;/dc:publisher&gt;
  &lt;dc:language&gt;eng&lt;/dc:language&gt;
&lt;/dc:dc&gt;

 </programlisting>
 </para>
 </refsect1>

 <refsect1>
  <title>FILES</title>
  <para>
   <filename moreinfo="none">record_conv.h</filename>
  </para>
 </refsect1>
 <refsect1>
  <title>SEE ALSO</title>
  <para>
   yaz(7)
  </para>
 </refsect1>
</refentry>