Read Marc data

Source: Internet
Author: User

Read, it is divided into two steps, one read, one take.

Read: The Marc file is a text in. ISO format. Each record is a branch and has a terminator CHR (29 ). Therefore, you can read data in one row.

Obtain: first obtain the information of the record header area and address directory area, and then cut the Information Based on the location and address of the address directory area. The field separator CHR (30) and the sub-field identifier CHR (31) are provided here)

Or give an example:

$ -------- CHR (31)

@ -------- CHR (30)

% -------- CHR (29)

# -------- Space

The above is an alternative symbol for learning convenience.

This is a piece of Marc data:

1. header area: 01071nam0 #2200277 ### 450 #

Fixed to 24 bits. Note that there must be no less space ..

01071: Total record length, 5 digits

Nam0: if it is a series (with 225 fields), it is oam2. Of course, each bit has a specific meaning. There are other changes. This is commonly used.

22: generally 22. You can check the meaning of the description.

00277: the total length of characters before the data field area, 5 characters.

450: Generally, let's take a look at the book.

 

2.Address directory area, artificially added";"And","Yes.

00000, 00013 ;.............................. 00771 @

 

00000:Field001(3Characters in length.0013(4Bit),Start position in the data field area00000(5Bit)

00771:Field801, Character Length0022,Start position in the data field area00771

This is an important part of reading. It is easy to split the data. Each is of a fixed length.

3.Data Field Area

012001022343@20020928000000.0 @ # $ a7-80142-191-4 $ dcny46.00 @................................................ @ %

Between fields is@Separated$.

@##$ here ## indicates the position of the indicator. For example, the 101 field has an indicator 012, SO @ 012 $

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.