Document more yaz-marcdump options
[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      <!ENTITY % local SYSTEM "local.ent">
5      %local;
6      <!ENTITY % entities SYSTEM "entities.ent">
7      %entities;
8      <!ENTITY % idcommon SYSTEM "common/common.ent">
9      %idcommon;
10 ]>
11 <!-- $Id: yaz-marcdump-man.xml,v 1.15 2007-09-23 07:40:13 adam Exp $ -->
12 <refentry id="yaz-marcdump">
13  <refentryinfo>
14   <productname>YAZ</productname>
15   <productnumber>&version;</productnumber>
16  </refentryinfo>
17  <refmeta>
18   <refentrytitle>yaz-marcdump</refentrytitle>
19   <manvolnum>1</manvolnum>
20  </refmeta>
21  
22  <refnamediv>
23   <refname>yaz-marcdump</refname>
24   <refpurpose>MARC record dump utility</refpurpose>
25  </refnamediv>
26  
27  <refsynopsisdiv>
28   <cmdsynopsis>
29    <command>yaz-marcdump</command>
30    <arg choice="opt"><option>-i <replaceable>format</replaceable></option></arg>
31    <arg choice="opt"><option>-o <replaceable>format</replaceable></option></arg>
32    <arg choice="opt"><option>-f <replaceable>from</replaceable></option></arg>
33    <arg choice="opt"><option>-t <replaceable>to</replaceable></option></arg>
34    <arg choice="opt"><option>-l <replaceable>spec</replaceable></option></arg>
35    <arg choice="opt"><option>-v</option></arg>
36    <arg choice="opt"><option>-c <replaceable>cfile</replaceable></option></arg>
37    <arg choice="opt"><option>-s <replaceable>prefix</replaceable></option></arg>
38    <arg choice="opt"><option>-C <replaceable>size</replaceable></option></arg>
39    <arg choice="opt"><option>-p</option></arg>
40    <arg choice="opt" rep="repeat">file</arg>
41   </cmdsynopsis>
42  </refsynopsisdiv>
43  
44  <refsect1><title>DESCRIPTION</title>
45   <para>
46    <command>yaz-marcdump</command> reads MARC records from one or
47    more files.
48    It parses each record and supports output in line-format, 
49    ISO2709, MARCXML, MarcXchange as well as Hex output.
50   </para>
51   <para>
52    This utility parses records ISO2709(raw MARC) as well as XML
53    if that is structured as MARCXML/MarcXchange.
54   </para>
55   <note>
56    <para>
57     As of YAZ 2.1.18, OAI-MARC is no longer supported.
58     OAI-MARC is deprecated. Use MARCXML instead.
59    </para>
60   </note>
61   <para>
62    By default, each record is written to standard output in a line
63    format with newline for each field, $x for each subfield x.
64    The output format may be changed with option <literal>-o</literal>,
65   </para>
66   <para>
67    <command>yaz-marcdump</command> can also be requested to perform
68    character set conversion of each record.
69   </para>
70  </refsect1>
71  
72  <refsect1><title>OPTIONS</title>
73   
74   <variablelist>
75    <varlistentry>
76     <term>-i <replaceable>format</replaceable></term>
77     <listitem><para>
78       Specifies input format. Must be one of
79       <literal>marcxml</literal>, <literal>marc</literal> (ISO2709),
80       <literal>marcxchange</literal> (ISO25577),
81       <literal>line</literal> (line mode MARC).
82      </para></listitem>
83    </varlistentry>
84
85    <varlistentry>
86     <term>-o <replaceable>format</replaceable></term>
87     <listitem><para>
88       Specifies output format. Must be one of
89       <literal>marcxml</literal>, <literal>marc</literal> (ISO2709),
90       <literal>marcxchange</literal> (ISO25577),
91       <literal>line</literal> (line mode MARC).
92      </para></listitem>
93    </varlistentry>
94
95    <varlistentry>
96     <term>-f <replaceable>from</replaceable></term>
97     <listitem><para>
98       Specify the character set <replaceable>from</replaceable>
99       of the input MARC record.
100       Should be used in conjunction with option <literal>-t</literal>.
101      </para></listitem>
102    </varlistentry>
103
104    <varlistentry>
105     <term>-t <replaceable>to</replaceable></term>
106     <listitem><para>
107       Specify the character set <replaceable>of</replaceable>
108       of the output.
109       Should be used in conjunction with option <literal>-f</literal>.
110      </para></listitem>
111    </varlistentry>
112
113    <varlistentry>
114     <term>-l <replaceable>leaderspec</replaceable></term>
115     <listitem><para>
116       Specify a simple modification string for MARC leader. The
117       <replaceable>leaderspec</replaceable> is a list of pos=value
118       pairs, where pos is an integer offset (0 - 23) for leader. Value
119       is either a quoted string or an integer (character value in decimal).
120       Pairs are comma separated. For example, to set leader at offset 9
121       to a, use <literal>9=a</literal>.
122      </para></listitem>
123    </varlistentry>
124
125    <varlistentry>
126     <term>-v</term>
127     <listitem><para>
128       Writes more information about the parsing process.
129       Useful if you have ill-formatted ISO2709 records as input.
130      </para></listitem>
131    </varlistentry>
132
133    <varlistentry>
134     <term>-s <replaceable>prefix</replaceable></term>
135     <listitem><para>
136       Writes a chunk of records to a separate file with prefix given,
137       i.e. splits a record batch into files with only at most
138       "chunk" ISO2709 record per file. By default chunk is 1 (one record
139       per file). See option <literal>-C</literal>.
140      </para></listitem>
141    </varlistentry>
142
143    <varlistentry>
144     <term>-C <replaceable>chunksize</replaceable></term>
145     <listitem><para>
146       Specifies chunk size; to be used conjunction with option 
147       <literal>-s</literal>.
148      </para></listitem>
149    </varlistentry>
150
151    <varlistentry>
152     <term>-p</term>
153     <listitem><para>
154       Makes yaz-marcdump prints record number and input file offset
155       of each record read.
156      </para></listitem>
157    </varlistentry>
158
159   </variablelist>
160  </refsect1>
161
162  <refsect1><title>EXAMPLES</title>
163   <para>
164    The following command converts MARC21/USMARC in MARC-8 encoding to
165    MARC21/USMARC in UTF-8 encoding. Leader offset 9 is set to 'a'.
166    Both input and output records are ISO2709 encoded.
167    <screen>
168     yaz-marcdump -f MARC-8 -t UTF-8 -o marc -l 9=97 marc21.raw >marc21.utf8.raw
169    </screen>
170   </para>
171   <para>
172    The same records may be converted to MARCXML instead in UTF-8:
173    <screen>
174     yaz-marcdump -f MARC-8 -t UTF-8 -o marcxml marc21.raw >marcxml.xml
175    </screen>
176   </para>
177  </refsect1> 
178
179  <refsect1><title>FILES</title>
180   <para>
181    <filename><replaceable>prefix</replaceable>/bin/yaz-marcdump</filename>
182   </para>
183   <para>
184    <filename><replaceable>prefix</replaceable>/include/yaz/marcdisp.h</filename>
185   </para>
186   </refsect1>
187  <refsect1><title>SEE ALSO</title>
188   <para>
189    yaz(7)
190   </para>
191  </refsect1>
192 </refentry>
193
194 <!-- Keep this comment at the end of the file
195 Local variables:
196 mode: sgml
197 sgml-omittag:t
198 sgml-shorttag:t
199 sgml-minimize-attributes:nil
200 sgml-always-quote-attributes:t
201 sgml-indent-step:1
202 sgml-indent-data:t
203 sgml-parent-document:nil
204 sgml-local-catalogs: nil
205 sgml-namecase-general:t
206 End:
207 -->