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] [-O offset] [-L limit]
11                    [-n] [-p] [-r] [-v] [-V] [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 sub-field 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       -O offset
73           Integer offset for at what position records whould be written.
74           0=first record, 1=second, .. With -L option, this allows a specific
75           range of records to be processed.
76
77       -L limit
78           Integer limit for how many records should at most be written. With
79           -O option, this allows a specific range of records to be processed.
80
81       -p
82           Makes yaz-marcdump print record number and input file offset of
83           each record read.
84
85       -n
86           MARC output is omitted so that MARC input is only checked.
87
88       -r
89           Writes to stderr a summary about number of records read by
90           yaz-marcdump.
91
92       -v
93           Writes more information about the parsing process. Useful if you
94           have ill-formatted ISO2709 records as input.
95
96       -V
97           Prints YAZ version.
98

EXAMPLES

100       The following command converts MARC21/USMARC in MARC-8 encoding to
101       MARC21/USMARC in UTF-8 encoding. Leader offset 9 is set to 'a'. Both
102       input and output records are ISO2709 encoded.
103
104               yaz-marcdump -f MARC-8 -t UTF-8 -o marc -l 9=97 marc21.raw >marc21.utf8.raw
105
106
107       The same records may be converted to MARCXML instead in UTF-8:
108
109               yaz-marcdump -f MARC-8 -t UTF-8 -o marcxml marc21.raw >marcxml.xml
110
111
112       Turbo MARC is a compact XML notation with same semantics as MARCXML,
113       but which allows for faster processing via XSLT. In order to generate
114       Turbo MARC records encoded in UTF-8 from MARC21 (ISO), one could use:
115
116               yaz-marcdump -f MARC8 -t UTF8 -o turbomarc -i marc marc21.raw >out.xml
117
118
119

FILES

121       prefix/bin/yaz-marcdump
122
123       prefix/include/yaz/marcdisp.h
124

SEE ALSO

126       yaz(7)
127
128       yaz-iconv(1)
129

AUTHORS

131       Index Data
132

NOTES

134        1. MARCXML
135           https://www.loc.gov/standards/marcxml/
136
137        2. MARC-in-JSON
138           https://rossfsinger.com/blog/2010/09/a-proposal-to-serialize-marc-in-json/
139
140        3. MarcXchange
141           https://www.loc.gov/standards/iso25577/
142
143
144
145YAZ 5.34.0                        01/12/2023                   YAZ-MARCDUMP(1)
Impressum