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