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 $