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