User Commands YAZ-MARCDUMP(1) NAME yaz-marcdump - MARC record dump utility SYNOPSIS yaz-marcdump [-i _f_o_r_m_a_t] [-o _f_o_r_m_a_t] [-f _f_r_o_m] [-t _t_o] [-l _s_p_e_c] [-c _c_f_i_l_e] [-s _p_r_e_f_i_x] [-C _s_i_z_e] [-n] [-p] [-v] [-V] [file...] DESCRIPTION yaz-marcdump 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. This utility parses records ISO2709(raw MARC) as well as XML if that is structured as MARCXML/MarcXchange. Note As of YAZ 2.1.18, OAI-MARC is no longer supported. OAI-MARC is deprecated. Use MARCXML instead. 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 option -o, yaz-marcdump can also be requested to perform character set conversion of each record. OPTIONS -i _f_o_r_m_a_t Specifies input format. Must be one of marcxml, marc (ISO2709), marcxchange (ISO25577), line (line mode MARC). -o _f_o_r_m_a_t Specifies output format. Must be one of marcxml, marc (ISO2709), marcxchange (ISO25577), line (line mode MARC). -f _f_r_o_m Specify the character set _f_r_o_m of the input MARC record. Should be used in conjunction with option -t. Refer to the yaz-iconv man page for supported character sets. -t _t_o Specify the character set _o_f of the output. Should be used in conjunction with option -f. Refer to the yaz-iconv man page for supported character sets. -l _l_e_a_d_e_r_s_p_e_c Specify a simple modification string for MARC leader. The _l_e_a_d_e_r_s_p_e_c is a list of pos=value pairs, where pos YAZ 3.0.46 Last change: 06/08/2009 1 User Commands YAZ-MARCDUMP(1) 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. -s _p_r_e_f_i_x Writes a chunk of records to a separate file with prefix given, i.e. splits a record batch into files with only at most "chunk" ISO2709 record per file. By default chunk is 1 (one record per file). See option -C. -C _c_h_u_n_k_s_i_z_e Specifies chunk size; to be used conjunction with option -s. -p Makes yaz-marcdump prints record number and input file offset of each record read. -n MARC output is omitted so that MARC input is only checkecd. -v Writes more information about the parsing process. Useful if you have ill-formatted ISO2709 records as input. -V Prints YAZ version. EXAMPLES 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. yaz-marcdump -f MARC-8 -t UTF-8 -o marc -l 9=97 marc21.raw >marc21.utf8.raw The same records may be converted to MARCXML instead in UTF-8: yaz-marcdump -f MARC-8 -t UTF-8 -o marcxml marc21.raw >marcxml.xml FILES _p_r_e_f_i_x/_b_i_n/_y_a_z-_m_a_r_c_d_u_m_p _p_r_e_f_i_x/_i_n_c_l_u_d_e/_y_a_z/_m_a_r_c_d_i_s_p._h YAZ 3.0.46 Last change: 06/08/2009 2 User Commands YAZ-MARCDUMP(1) SEE ALSO yaz(7) yaz-iconv(1) ATTRIBUTES See attributes(5) for descriptions of the following attributes: _______________________________________ | ATTRIBUTE TYPE | ATTRIBUTE VALUE| |_________________________________________|____________________________________|_ | Availability | SUNWlibyaz | |_________________________________________|____________________________________|_ | Interface Stability| Uncommitted | |_____________________|__________________| NOTES Source for YAZ is available on http://opensolaris.org. YAZ 3.0.46 Last change: 06/08/2009 3