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