protecting log rotation with a mutex
[yaz-moved-to-github.git] / doc / yaz-marcdump-man.xml
1 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
2 <!-- $Id: yaz-marcdump-man.xml,v 1.3 2003-12-11 00:37:21 adam Exp $ -->
3 <refentry id="yaz-marcdump">
4  <refmeta>
5   <refentrytitle>yaz-marcdump</refentrytitle>
6   <manvolnum>1</manvolnum>
7  </refmeta>
8  
9  <refnamediv>
10   <refname>yaz-marcdump</refname>
11   <refpurpose>MARC record dump utility</refpurpose>
12  </refnamediv>
13  
14  <refsynopsisdiv>
15   <cmdsynopsis>
16    <command>yaz-marcdump</command>
17    <arg choice="opt"><option>-x</option></arg>
18    <arg choice="opt"><option>-X</option></arg>
19    <arg choice="opt"><option>-I</option></arg>
20    <arg choice="opt"><option>-O</option></arg>
21    <arg choice="opt"><option>-f <replaceable>from</replaceable></option></arg>
22    <arg choice="opt"><option>-t <replaceable>to</replaceable></option></arg>
23    <arg choice="opt"><option>-v</option></arg>
24    <arg choice="opt"><option>-c <replaceable>cfile</replaceable></option></arg>
25    <arg choice="opt" rep="repeat">file</arg>
26   </cmdsynopsis>
27  </refsynopsisdiv>
28  
29  <refsect1><title>DESCRIPTION</title>
30   <para>
31    <command>yaz-marcdump</command> reads ISO2709/MARC records from one or
32    more files.
33    It validates each record and supports output in line-format, 
34    MARCXML, OAIMARC as well as Hex output.
35   </para>
36   <para>
37    By default, each record is printed to standard output in a line
38    format with newline for each field, $x for each subfield x.
39   </para>
40   <para>
41    <command>yaz-marcdump</command> can also be requested to perform
42    character set conversion of each record.
43   </para>
44  </refsect1>
45  
46  <refsect1><title>OPTIONS</title>
47   
48   <variablelist>
49    <varlistentry>
50     <term>-x</term>
51     <listitem><para>
52       Print MARC records in a simple XML format. 
53       This format is equivalent to YAZ_MARC_SIMPLEXML in
54       <filename>yaz/marcdisp.h</filename>.
55      </para></listitem>
56    </varlistentry>
57
58    <varlistentry>
59     <term>-X</term>
60     <listitem><para>
61       Print MARC records in MARCXML.
62       This format is equivalent to YAZ_MARC_MARCXML in
63       <filename>yaz/marcdisp.h</filename>.
64      </para></listitem>
65    </varlistentry>
66
67    <varlistentry>
68     <term>-I</term>
69     <listitem><para>
70       Print MARC records in ISO2709 format.
71       This format is equivalent to YAZ_MARC_ISO2709 in
72       <filename>yaz/marcdisp.h</filename>.
73      </para></listitem>
74    </varlistentry>
75
76    <varlistentry>
77     <term>-O</term>
78     <listitem><para>
79       Print MARC records in OAIMARC. Another XML variant.
80       This format is equivalent to YAZ_MARC_OAIMARC in
81       <filename>yaz/marcdisp.h</filename>.
82      </para></listitem>
83    </varlistentry>
84    
85    <varlistentry>
86     <term>-f<replaceable>from</replaceable>]</term>
87     <listitem><para>
88       Specify the character set <replaceable>from</replaceable>
89       of the input MARC record.
90       Should be used in conjunction with option <literal>-t</literal>.
91      </para></listitem>
92    </varlistentry>
93
94    <varlistentry>
95     <term>-t<replaceable>to</replaceable>]</term>
96     <listitem><para>
97       Specify the character set <replaceable>of</replaceable>
98       of the output.
99       Should be used in conjunction with option <literal>-f</literal>.
100      </para></listitem>
101    </varlistentry>
102
103    <varlistentry>
104     <term>-v</term>
105     <listitem><para>
106       Print more information about the parsing process.
107       Useful if you have ill-formatted ISO2709 records as input.
108      </para></listitem>
109    </varlistentry>
110
111   </variablelist>
112  </refsect1>
113
114  <refsect1><title>EXAMPLES</title>
115   <para>
116    The following command converts MARC21/USMARC in MARC-8 encoding to
117    MARC21/USMARC in UTF-8 encoding. (Both input and output is in ISO2709).
118    <screen>
119     yaz-marcdump -f MARC-8 -t UTF-8 -I marc21.raw >marc21.utf8.raw
120    </screen>
121   </para>
122   <para>
123    The same records may be converted to MARCXML instead in UTF-8:
124    <screen>
125     yaz-marcdump -f MARC-8 -t UTF-8 -X marc21.raw >marcxml.xml
126    </screen>
127   </para>
128  </refsect1> 
129
130  <refsect1><title>FILES</title>
131   <para>
132    <filename><replaceable>prefix</replaceable>/bin/yaz-marcdump</filename>
133   </para>
134   <para>
135    <filename><replaceable>prefix</replaceable>/include/yaz/marcdisp.h</filename>
136   </para>
137   </refsect1>
138  <refsect1><title>SEE ALSO</title>
139   <para>
140    yaz(7)
141   </para>
142  </refsect1>
143 </refentry>
144
145 <!-- Keep this comment at the end of the file
146 Local variables:
147 mode: sgml
148 sgml-omittag:t
149 sgml-shorttag:t
150 sgml-minimize-attributes:nil
151 sgml-always-quote-attributes:t
152 sgml-indent-step:1
153 sgml-indent-data:t
154 sgml-parent-document:nil
155 sgml-local-catalogs: nil
156 sgml-namecase-general:t
157 End:
158 -->