1YAZ-MARCDUMP(1)                    Commands                    YAZ-MARCDUMP(1)
2
3
4

NAME

6       yaz-marcdump - MARC record dump utility
7

SYNOPSIS

9       yaz-marcdump [-i format] [-o format] [-f from] [-t to] [-l spec]
10                    [-c cfile] [-s prefix] [-C size] [-n] [-p] [-v] [-V]
11                    [file...]
12

DESCRIPTION

14       yaz-marcdump reads MARC records from one or more files. It parses each
15       record and supports output in line-format, ISO2709, MARCXML[1],
16       MARC-in-JSON[2], MarcXchange[3] as well as Hex output.
17
18       This utility parses records ISO2709(raw MARC), line format,
19       MARC-in-JSON format as well as XML if that is structured as
20       MARCXML/MarcXchange.
21
22       MARC-in-JSON encoding/decoding is supported in YAZ 5.0.5 and later.
23
24           Note
25           As of YAZ 2.1.18, OAI-MARC is no longer supported. OAI-MARC is
26           deprecated. Use MARCXML instead.
27
28       By default, each record is written to standard output in a line format
29       with newline for each field, $x for each subfield x. The output format
30       may be changed with option -o,
31
32       yaz-marcdump can also be requested to perform character set conversion
33       of each record.
34

OPTIONS

36       -i format
37           Specifies input format. Must be one of marcxml, marc (ISO2709),
38           marcxchange (ISO25577), line (line mode MARC), turbomarc (Turbo
39           MARC), or json (MARC-in-JSON).
40
41       -o format
42           Specifies output format. Must be one of marcxml, marc (ISO2709),
43           marcxchange (ISO25577), line (line mode MARC), turbomarc (Turbo
44           MARC), or json (MARC-in-JSON).
45
46       -f from
47           Specify the character set of the input MARC record. Should be used
48           in conjunction with option -t. Refer to the yaz-iconv man page for
49           supported character sets.
50
51       -t to
52           Specify the character set of the output. Should be used in
53           conjunction with option -f. Refer to the yaz-iconv man page for
54           supported character sets.
55
56       -l leaderspec
57           Specify a simple modification string for MARC leader. The
58           leaderspec is a list of pos=value pairs, where pos is an integer
59           offset (0 - 23) for leader. Value is either a quoted string or an
60           integer (character value in decimal). Pairs are comma separated.
61           For example, to set leader at offset 9 to a, use 9='a'.
62
63       -s prefix
64           Writes a chunk of records to a separate file with prefix given,
65           i.e. splits a record batch into files with only at most "chunk"
66           ISO2709 records per file. By default chunk is 1 (one record per
67           file). See option -C.
68
69       -C chunksize
70           Specifies chunk size; to be used conjunction with option -s.
71
72       -p
73           Makes yaz-marcdump print record number and input file offset of
74           each record read.
75
76       -n
77           MARC output is omitted so that MARC input is only checked.
78
79       -v
80           Writes more information about the parsing process. Useful if you
81           have ill-formatted ISO2709 records as input.
82
83       -V
84           Prints YAZ version.
85

EXAMPLES

87       The following command converts MARC21/USMARC in MARC-8 encoding to
88       MARC21/USMARC in UTF-8 encoding. Leader offset 9 is set to 'a'. Both
89       input and output records are ISO2709 encoded.
90
91               yaz-marcdump -f MARC-8 -t UTF-8 -o marc -l 9=97 marc21.raw >marc21.utf8.raw
92
93
94       The same records may be converted to MARCXML instead in UTF-8:
95
96               yaz-marcdump -f MARC-8 -t UTF-8 -o marcxml marc21.raw >marcxml.xml
97
98
99       Turbo MARC is a compact XML notation with same semantics as MARCXML,
100       but which allows for faster processing via XSLT. In order to generate
101       Turbo MARC records encoded in UTF-8 from MARC21 (ISO), one could use:
102
103               yaz-marcdump -f MARC8 -t UTF8 -o turbomarc -i marc marc21.raw >out.xml
104
105
106

FILES

108       prefix/bin/yaz-marcdump
109
110       prefix/include/yaz/marcdisp.h
111

SEE ALSO

113       yaz(7)
114
115       yaz-iconv(1)
116

NOTES

118        1. MARCXML
119           http://www.loc.gov/standards/marcxml/
120
121        2. MARC-in-JSON
122           http://dilettantes.code4lib.org/blog/2010/09/a-proposal-to-serialize-marc-in-json/
123
124        3. MarcXchange
125           http://www.loc.gov/standards/iso25577/
126
127
128
129YAZ 5.14.11                       10/09/2015                   YAZ-MARCDUMP(1)
Impressum