.\" Title: yaz\-marcdump .\" Author: .\" Generator: DocBook XSL Stylesheets v1.70.1 .\" Date: 09/04/2006 .\" Manual: .\" Source: YAZ 2.1.28 .\" .TH "YAZ\-MARCDUMP" "1" "09/04/2006" "YAZ 2.1.28" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" yaz\-marcdump \- MARC record dump utility .SH "SYNOPSIS" .HP 13 \fByaz\-marcdump\fR [\fB\-x\fR] [\fB\-X\fR] [\fB\-e\fR] [\fB\-I\fR] [\fB\-f\ \fR\fB\fIfrom\fR\fR] [\fB\-t\ \fR\fB\fIto\fR\fR] [\fB\-l\ \fR\fB\fIspec\fR\fR] [\fB\-v\fR] [\fB\-c\ \fR\fB\fIcfile\fR\fR] [file...] .SH "DESCRIPTION" .PP \fByaz\-marcdump\fR 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. .PP This utility parses records ISO2709(raw MARC) as well as XML if that is structured as MARCXML/MarcXchange. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br \fBNote\fR .PP As of YAZ 2.1.18, OAI\-MARC is no longer supported. OAI\-MARC is deprecated. Use MARCXML instead. .PP 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 \-X, \-e, \-I. .PP \fByaz\-marcdump\fR can also be requested to perform character set conversion of each record. .SH "OPTIONS" .TP 3n \-x Reads MARC records in MARCXML/MarcXchange format. Without this option, \fByaz\-marcdump\fR reads records in ISO2709 format. .TP 3n \-X Writes MARC records in MARCXML. This format is equivalent to YAZ_MARC_MARCXML in \fIyaz/marcdisp.h\fR. .TP 3n \-e Writes MARC records in MarcXchange format. This format is equivalent to YAZ_MARC_XCHANGE in \fIyaz/marcdisp.h\fR. .TP 3n \-I Writes MARC records in ISO2709 format. This format is equivalent to YAZ_MARC_ISO2709 in \fIyaz/marcdisp.h\fR. .TP 3n \-f \fIfrom\fR Specify the character set \fIfrom\fR of the input MARC record. Should be used in conjunction with option \-t. .TP 3n \-t \fIto\fR Specify the character set \fIof\fR of the output. Should be used in conjunction with option \-f. .TP 3n \-l \fIleaderspec\fR Specify a simple modification string for MARC leader. The \fIleaderspec\fR is a list of pos=value pairs, where pos is an integer offset (0 \- 23) for leader. Value is either a quoted string or an integer (character value in decimal). Pairs are comma separated. For example, to set leader at offset 9 to a, use 9=a. .TP 3n \-v Writes more information about the parsing process. Useful if you have ill\-formatted ISO2709 records as input. .SH "EXAMPLES" .PP The following command converts MARC21/USMARC in MARC\-8 encoding to MARC21/USMARC in UTF\-8 encoding. Leader offset 9 is set to 'a'. Both input and output records are ISO2709 encoded. .sp .RS 3n .nf yaz\-marcdump \-f MARC\-8 \-t UTF\-8 \-I \-l 9=97 marc21.raw >marc21.utf8.raw .fi .RE .sp .PP The same records may be converted to MARCXML instead in UTF\-8: .sp .RS 3n .nf yaz\-marcdump \-f MARC\-8 \-t UTF\-8 \-X marc21.raw >marcxml.xml .fi .RE .sp .SH "FILES" .PP \fI\fIprefix\fR\fR\fI/bin/yaz\-marcdump\fR .PP \fI\fIprefix\fR\fR\fI/include/yaz/marcdisp.h\fR .SH "SEE ALSO" .PP yaz(7)