New facilities for the MARC module. The reading - and writing of
[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.6 2006-04-19 10:05:02 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>-e</option></arg>
20    <arg choice="opt"><option>-I</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 MARC records from one or
32    more files.
33    It parses each record and supports output in line-format, 
34    ISO2709, MARCXML, MarcXchange as well as Hex output.
35   </para>
36   <para>
37    This utility parses records ISO2709(raw MARC) as well as XML
38    if that is structured as MARCXML/MarcXchange.
39   </para>
40   <note>
41    <para>
42     As of YAZ 2.1.18, OAI-MARC is no longer supported.
43     OAI-MARC is deprecated. Use MARCXML instead.
44    </para>
45   </note>
46   <para>
47    By default, each record is written to standard output in a line
48    format with newline for each field, $x for each subfield x.
49    The output format may be changed with options <literal>-X</literal>,
50    <literal>-e</literal>, <literal>-I</literal>.
51   </para>
52   <para>
53    <command>yaz-marcdump</command> can also be requested to perform
54    character set conversion of each record.
55   </para>
56  </refsect1>
57  
58  <refsect1><title>OPTIONS</title>
59   
60   <variablelist>
61    <varlistentry>
62     <term>-x</term>
63     <listitem><para>
64       Reads MARC records in MARCXML/MarcXchange format. Without
65       this option, <command>yaz-marcdump</command> reads records
66       in ISO2709 format.
67      </para></listitem>
68    </varlistentry>
69
70    <varlistentry>
71     <term>-X</term>
72     <listitem><para>
73       Writes MARC records in MARCXML.
74       This format is equivalent to YAZ_MARC_MARCXML in
75       <filename>yaz/marcdisp.h</filename>.
76      </para></listitem>
77    </varlistentry>
78
79    <varlistentry>
80     <term>-e</term>
81     <listitem><para>
82       Writes MARC records in MarcXchange format.
83       This format is equivalent to YAZ_MARC_XCHANGE in
84       <filename>yaz/marcdisp.h</filename>.
85      </para></listitem>
86    </varlistentry>
87
88    <varlistentry>
89     <term>-I</term>
90     <listitem><para>
91       Writes MARC records in ISO2709 format.
92       This format is equivalent to YAZ_MARC_ISO2709 in
93       <filename>yaz/marcdisp.h</filename>.
94      </para></listitem>
95    </varlistentry>
96
97    <varlistentry>
98     <term>-f<replaceable>from</replaceable>]</term>
99     <listitem><para>
100       Specify the character set <replaceable>from</replaceable>
101       of the input MARC record.
102       Should be used in conjunction with option <literal>-t</literal>.
103      </para></listitem>
104    </varlistentry>
105
106    <varlistentry>
107     <term>-t<replaceable>to</replaceable>]</term>
108     <listitem><para>
109       Specify the character set <replaceable>of</replaceable>
110       of the output.
111       Should be used in conjunction with option <literal>-f</literal>.
112      </para></listitem>
113    </varlistentry>
114
115    <varlistentry>
116     <term>-v</term>
117     <listitem><para>
118       Writes more information about the parsing process.
119       Useful if you have ill-formatted ISO2709 records as input.
120      </para></listitem>
121    </varlistentry>
122
123   </variablelist>
124  </refsect1>
125
126  <refsect1><title>EXAMPLES</title>
127   <para>
128    The following command converts MARC21/USMARC in MARC-8 encoding to
129    MARC21/USMARC in UTF-8 encoding. (Both input and output is in ISO2709).
130    <screen>
131     yaz-marcdump -f MARC-8 -t UTF-8 -I marc21.raw >marc21.utf8.raw
132    </screen>
133   </para>
134   <para>
135    The same records may be converted to MARCXML instead in UTF-8:
136    <screen>
137     yaz-marcdump -f MARC-8 -t UTF-8 -X marc21.raw >marcxml.xml
138    </screen>
139   </para>
140  </refsect1> 
141
142  <refsect1><title>FILES</title>
143   <para>
144    <filename><replaceable>prefix</replaceable>/bin/yaz-marcdump</filename>
145   </para>
146   <para>
147    <filename><replaceable>prefix</replaceable>/include/yaz/marcdisp.h</filename>
148   </para>
149   </refsect1>
150  <refsect1><title>SEE ALSO</title>
151   <para>
152    yaz(7)
153   </para>
154  </refsect1>
155 </refentry>
156
157 <!-- Keep this comment at the end of the file
158 Local variables:
159 mode: sgml
160 sgml-omittag:t
161 sgml-shorttag:t
162 sgml-minimize-attributes:nil
163 sgml-always-quote-attributes:t
164 sgml-indent-step:1
165 sgml-indent-data:t
166 sgml-parent-document:nil
167 sgml-local-catalogs: nil
168 sgml-namecase-general:t
169 End:
170 -->