<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
<!-- $Id: yaz-marcdump-man.xml,v 1.6 2006/04/19 10:05:02 adam Exp $ -->
<refentry id="yaz-marcdump">
 <refmeta>
  <refentrytitle>yaz-marcdump</refentrytitle>
  <manvolnum>1</manvolnum>
 </refmeta>
 
 <refnamediv>
  <refname>yaz-marcdump</refname>
  <refpurpose>MARC record dump utility</refpurpose>
 </refnamediv>
 
 <refsynopsisdiv>
  <cmdsynopsis>
   <command>yaz-marcdump</command>
   <arg choice="opt"><option>-x</option></arg>
   <arg choice="opt"><option>-X</option></arg>
   <arg choice="opt"><option>-e</option></arg>
   <arg choice="opt"><option>-I</option></arg>
   <arg choice="opt"><option>-f <replaceable>from</replaceable></option></arg>
   <arg choice="opt"><option>-t <replaceable>to</replaceable></option></arg>
   <arg choice="opt"><option>-v</option></arg>
   <arg choice="opt"><option>-c <replaceable>cfile</replaceable></option></arg>
   <arg choice="opt" rep="repeat">file</arg>
  </cmdsynopsis>
 </refsynopsisdiv>
 
 <refsect1><title>DESCRIPTION</title>
  <para>
   <command>yaz-marcdump</command> reads MARC records from one or
   more files.
   It parses each record and supports output in line-format, 
   ISO2709, MARCXML, MarcXchange as well as Hex output.
  </para>
  <para>
   This utility parses records ISO2709(raw MARC) as well as XML
   if that is structured as MARCXML/MarcXchange.
  </para>
  <note>
   <para>
    As of YAZ 2.1.18, OAI-MARC is no longer supported.
    OAI-MARC is deprecated. Use MARCXML instead.
   </para>
  </note>
  <para>
   By default, each record is written to standard output in a line
   format with newline for each field, $x for each subfield x.
   The output format may be changed with options <literal>-X</literal>,
   <literal>-e</literal>, <literal>-I</literal>.
  </para>
  <para>
   <command>yaz-marcdump</command> can also be requested to perform
   character set conversion of each record.
  </para>
 </refsect1>
 
 <refsect1><title>OPTIONS</title>
  
  <variablelist>
   <varlistentry>
    <term>-x</term>
    <listitem><para>
      Reads MARC records in MARCXML/MarcXchange format. Without
      this option, <command>yaz-marcdump</command> reads records
      in ISO2709 format.
     </para></listitem>
   </varlistentry>

   <varlistentry>
    <term>-X</term>
    <listitem><para>
      Writes MARC records in MARCXML.
      This format is equivalent to YAZ_MARC_MARCXML in
      <filename>yaz/marcdisp.h</filename>.
     </para></listitem>
   </varlistentry>

   <varlistentry>
    <term>-e</term>
    <listitem><para>
      Writes MARC records in MarcXchange format.
      This format is equivalent to YAZ_MARC_XCHANGE in
      <filename>yaz/marcdisp.h</filename>.
     </para></listitem>
   </varlistentry>

   <varlistentry>
    <term>-I</term>
    <listitem><para>
      Writes MARC records in ISO2709 format.
      This format is equivalent to YAZ_MARC_ISO2709 in
      <filename>yaz/marcdisp.h</filename>.
     </para></listitem>
   </varlistentry>

   <varlistentry>
    <term>-f<replaceable>from</replaceable>]</term>
    <listitem><para>
      Specify the character set <replaceable>from</replaceable>
      of the input MARC record.
      Should be used in conjunction with option <literal>-t</literal>.
     </para></listitem>
   </varlistentry>

   <varlistentry>
    <term>-t<replaceable>to</replaceable>]</term>
    <listitem><para>
      Specify the character set <replaceable>of</replaceable>
      of the output.
      Should be used in conjunction with option <literal>-f</literal>.
     </para></listitem>
   </varlistentry>

   <varlistentry>
    <term>-v</term>
    <listitem><para>
      Writes more information about the parsing process.
      Useful if you have ill-formatted ISO2709 records as input.
     </para></listitem>
   </varlistentry>

  </variablelist>
 </refsect1>

 <refsect1><title>EXAMPLES</title>
  <para>
   The following command converts MARC21/USMARC in MARC-8 encoding to
   MARC21/USMARC in UTF-8 encoding. (Both input and output is in ISO2709).
   <screen>
    yaz-marcdump -f MARC-8 -t UTF-8 -I marc21.raw >marc21.utf8.raw
   </screen>
  </para>
  <para>
   The same records may be converted to MARCXML instead in UTF-8:
   <screen>
    yaz-marcdump -f MARC-8 -t UTF-8 -X marc21.raw >marcxml.xml
   </screen>
  </para>
 </refsect1> 

 <refsect1><title>FILES</title>
  <para>
   <filename><replaceable>prefix</replaceable>/bin/yaz-marcdump</filename>
  </para>
  <para>
   <filename><replaceable>prefix</replaceable>/include/yaz/marcdisp.h</filename>
  </para>
  </refsect1>
 <refsect1><title>SEE ALSO</title>
  <para>
   yaz(7)
  </para>
 </refsect1>
</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
sgml-parent-document:nil
sgml-local-catalogs: nil
sgml-namecase-general:t
End:
-->
