1 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN"
2 "http://www.oasis-open.org/docbook/xml/4.1/docbookx.dtd"
4 <!ENTITY % local SYSTEM "local.ent">
6 <!ENTITY % entities SYSTEM "entities.ent">
8 <!ENTITY % idcommon SYSTEM "common/common.ent">
11 <refentry id="yaz-marcdump">
13 <productname>YAZ</productname>
14 <productnumber>&version;</productnumber>
17 <refentrytitle>yaz-marcdump</refentrytitle>
18 <manvolnum>1</manvolnum>
22 <refname>yaz-marcdump</refname>
23 <refpurpose>MARC record dump utility</refpurpose>
28 <command>yaz-marcdump</command>
29 <arg choice="opt"><option>-i <replaceable>format</replaceable></option></arg>
30 <arg choice="opt"><option>-o <replaceable>format</replaceable></option></arg>
31 <arg choice="opt"><option>-f <replaceable>from</replaceable></option></arg>
32 <arg choice="opt"><option>-t <replaceable>to</replaceable></option></arg>
33 <arg choice="opt"><option>-l <replaceable>spec</replaceable></option></arg>
34 <arg choice="opt"><option>-c <replaceable>cfile</replaceable></option></arg>
35 <arg choice="opt"><option>-s <replaceable>prefix</replaceable></option></arg>
36 <arg choice="opt"><option>-C <replaceable>size</replaceable></option></arg>
37 <arg choice="opt"><option>-n</option></arg>
38 <arg choice="opt"><option>-p</option></arg>
39 <arg choice="opt"><option>-v</option></arg>
40 <arg choice="opt"><option>-V</option></arg>
41 <arg choice="opt" rep="repeat">file</arg>
45 <refsect1><title>DESCRIPTION</title>
47 <command>yaz-marcdump</command> reads MARC records from one or
49 It parses each record and supports output in line-format,
50 ISO2709, MARCXML, MarcXchange as well as Hex output.
53 This utility parses records ISO2709(raw MARC) as well as XML
54 if that is structured as MARCXML/MarcXchange.
58 As of YAZ 2.1.18, OAI-MARC is no longer supported.
59 OAI-MARC is deprecated. Use MARCXML instead.
63 By default, each record is written to standard output in a line
64 format with newline for each field, $x for each subfield x.
65 The output format may be changed with option <literal>-o</literal>,
68 <command>yaz-marcdump</command> can also be requested to perform
69 character set conversion of each record.
73 <refsect1><title>OPTIONS</title>
77 <term>-i <replaceable>format</replaceable></term>
79 Specifies input format. Must be one of
80 <literal>marcxml</literal>, <literal>marc</literal> (ISO2709),
81 <literal>marcxchange</literal> (ISO25577),
82 <literal>line</literal> (line mode MARC).
87 <term>-o <replaceable>format</replaceable></term>
89 Specifies output format. Must be one of
90 <literal>marcxml</literal>, <literal>marc</literal> (ISO2709),
91 <literal>marcxchange</literal> (ISO25577),
92 <literal>line</literal> (line mode MARC).
97 <term>-f <replaceable>from</replaceable></term>
99 Specify the character set <replaceable>from</replaceable>
100 of the input MARC record.
101 Should be used in conjunction with option <literal>-t</literal>.
102 Refer to the yaz-iconv man page for supported character sets.
107 <term>-t <replaceable>to</replaceable></term>
109 Specify the character set <replaceable>of</replaceable>
111 Should be used in conjunction with option <literal>-f</literal>.
112 Refer to the yaz-iconv man page for supported character sets.
117 <term>-l <replaceable>leaderspec</replaceable></term>
119 Specify a simple modification string for MARC leader. The
120 <replaceable>leaderspec</replaceable> is a list of pos=value
121 pairs, where pos is an integer offset (0 - 23) for leader. Value
122 is either a quoted string or an integer (character value in decimal).
123 Pairs are comma separated. For example, to set leader at offset 9
124 to a, use <literal>9=a</literal>.
129 <term>-s <replaceable>prefix</replaceable></term>
131 Writes a chunk of records to a separate file with prefix given,
132 i.e. splits a record batch into files with only at most
133 "chunk" ISO2709 record per file. By default chunk is 1 (one record
134 per file). See option <literal>-C</literal>.
139 <term>-C <replaceable>chunksize</replaceable></term>
141 Specifies chunk size; to be used conjunction with option
142 <literal>-s</literal>.
149 Makes yaz-marcdump prints record number and input file offset
157 MARC output is omitted so that MARC input is only checkecd.
164 Writes more information about the parsing process.
165 Useful if you have ill-formatted ISO2709 records as input.
179 <refsect1><title>EXAMPLES</title>
181 The following command converts MARC21/USMARC in MARC-8 encoding to
182 MARC21/USMARC in UTF-8 encoding. Leader offset 9 is set to 'a'.
183 Both input and output records are ISO2709 encoded.
185 yaz-marcdump -f MARC-8 -t UTF-8 -o marc -l 9=97 marc21.raw >marc21.utf8.raw
189 The same records may be converted to MARCXML instead in UTF-8:
191 yaz-marcdump -f MARC-8 -t UTF-8 -o marcxml marc21.raw >marcxml.xml
196 <refsect1><title>FILES</title>
198 <filename><replaceable>prefix</replaceable>/bin/yaz-marcdump</filename>
201 <filename><replaceable>prefix</replaceable>/include/yaz/marcdisp.h</filename>
204 <refsect1><title>SEE ALSO</title>
212 <!-- Keep this comment at the end of the file
217 sgml-minimize-attributes:nil
218 sgml-always-quote-attributes:t
221 sgml-parent-document:nil
222 sgml-local-catalogs: nil
223 sgml-namecase-general:t