Initial commit
[yaz4j-moved-to-github.git] / dependencies / yaz-2.1.28 / doc / yaz-marcdump.1
1 .\"     Title: yaz\-marcdump
2 .\"    Author: 
3 .\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
4 .\"      Date: 09/04/2006
5 .\"    Manual: 
6 .\"    Source: YAZ 2.1.28
7 .\"
8 .TH "YAZ\-MARCDUMP" "1" "09/04/2006" "YAZ 2.1.28" ""
9 .\" disable hyphenation
10 .nh
11 .\" disable justification (adjust text to left margin only)
12 .ad l
13 .SH "NAME"
14 yaz\-marcdump \- MARC record dump utility
15 .SH "SYNOPSIS"
16 .HP 13
17 \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...]
18 .SH "DESCRIPTION"
19 .PP
20
21 \fByaz\-marcdump\fR
22 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.
23 .PP
24 This utility parses records ISO2709(raw MARC) as well as XML if that is structured as MARCXML/MarcXchange.
25 .sp
26 .it 1 an-trap
27 .nr an-no-space-flag 1
28 .nr an-break-flag 1
29 .br
30 \fBNote\fR
31 .PP
32 As of YAZ 2.1.18, OAI\-MARC is no longer supported. OAI\-MARC is deprecated. Use MARCXML instead.
33 .PP
34 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
35 \-X,
36 \-e,
37 \-I.
38 .PP
39
40 \fByaz\-marcdump\fR
41 can also be requested to perform character set conversion of each record.
42 .SH "OPTIONS"
43 .TP 3n
44 \-x
45 Reads MARC records in MARCXML/MarcXchange format. Without this option,
46 \fByaz\-marcdump\fR
47 reads records in ISO2709 format.
48 .TP 3n
49 \-X
50 Writes MARC records in MARCXML. This format is equivalent to YAZ_MARC_MARCXML in
51 \fIyaz/marcdisp.h\fR.
52 .TP 3n
53 \-e
54 Writes MARC records in MarcXchange format. This format is equivalent to YAZ_MARC_XCHANGE in
55 \fIyaz/marcdisp.h\fR.
56 .TP 3n
57 \-I
58 Writes MARC records in ISO2709 format. This format is equivalent to YAZ_MARC_ISO2709 in
59 \fIyaz/marcdisp.h\fR.
60 .TP 3n
61 \-f \fIfrom\fR
62 Specify the character set
63 \fIfrom\fR
64 of the input MARC record. Should be used in conjunction with option
65 \-t.
66 .TP 3n
67 \-t \fIto\fR
68 Specify the character set
69 \fIof\fR
70 of the output. Should be used in conjunction with option
71 \-f.
72 .TP 3n
73 \-l \fIleaderspec\fR
74 Specify a simple modification string for MARC leader. The
75 \fIleaderspec\fR
76 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
77 9=a.
78 .TP 3n
79 \-v
80 Writes more information about the parsing process. Useful if you have ill\-formatted ISO2709 records as input.
81 .SH "EXAMPLES"
82 .PP
83 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.
84 .sp
85 .RS 3n
86 .nf
87     yaz\-marcdump \-f MARC\-8 \-t UTF\-8 \-I \-l 9=97 marc21.raw >marc21.utf8.raw
88    
89 .fi
90 .RE
91 .sp
92 .PP
93 The same records may be converted to MARCXML instead in UTF\-8:
94 .sp
95 .RS 3n
96 .nf
97     yaz\-marcdump \-f MARC\-8 \-t UTF\-8 \-X marc21.raw >marcxml.xml
98    
99 .fi
100 .RE
101 .sp
102 .SH "FILES"
103 .PP
104
105 \fI\fIprefix\fR\fR\fI/bin/yaz\-marcdump\fR
106 .PP
107
108 \fI\fIprefix\fR\fR\fI/include/yaz/marcdisp.h\fR
109 .SH "SEE ALSO"
110 .PP
111 yaz(7)