Can not identify some LHR item records

19 views
Skip to first unread message

Frank Scaturro

unread,
Apr 24, 2025, 5:58:35 PMApr 24
to pymarc Discussion
For some reason, there are some item records that pymarc is having trouble identifying them and the 583 field that they have. The bib comes back with no items attached.

I'm using this code to identify LHR item records....
record_type = record.leader[6]
record_type in ['u', 'x']:  

Frank

Ed Summers

unread,
Apr 24, 2025, 6:13:40 PMApr 24
to pym...@googlegroups.com
Hi Frank,

Are you able to share a record that exhibits this problem?

//Ed
> --
> You received this message because you are subscribed to the Google Groups "pymarc Discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pymarc+un...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/pymarc/2fd04596-de6c-41ea-a750-a68a91bffe23n%40googlegroups.com.

Frank Scaturro

unread,
Apr 25, 2025, 4:13:51 PMApr 25
to pymarc Discussion
Hi Ed,  this is from the original mrk file that contains all types of 583  print holdings. (shortened snippet shown below))  the top is the bib and the bottom is the LHR. Also the 004 having the  bib number in it was from the move to oclc. Its not something I can rely on for every record. And the goal is to identify the exitance of  $fEAST records and then send the bibs to a new file called EAST.mrc

=LDR  02921cam a2200481 i 4500
=001  ocm00001752\
=003  OCoLC
=005  20250423213018.0
=008  690328m19681969inu\\\\\\b\\\\001\0\eng\\
=010  \\$a   68027576
 
=LDR  00564cv  a2200169zi 4500
=001  359332255
=003  OCoLC
=004  ocm00001752\
=007  zu
=008  2105050u\\\\8\\\0001aaeng0241213
=014  1\$a.b11324144$bZIH
=583  1\$acommitted to retain$c20160630$d20310630$fEAST$uhttp://eastlibraries.org/retained-materials$zEAST$5NHemH

Andy Kohler

unread,
Apr 28, 2025, 12:00:51 AMApr 28
to pym...@googlegroups.com
Hi Frank -

I may be misunderstanding, but if your code is looking for LDR/06 in ['u', 'x']
> record_type = record.leader[6]
> record_type in ['u', 'x']:


Then given your sample records (showing LDR only)
=LDR  02921cam a2200481 i 4500
=LDR  00564cv  a2200169zi 4500

The bib record has LDR/06 = a, and the LHR has LDR/06 = v.  Neither matches ['u', 'x'], 

--Andy 

Frank Scaturro

unread,
Apr 29, 2025, 9:17:24 AMApr 29
to pymarc Discussion
Hi Andy, 
it was as simple as adding a "v" for matching. What I find strange though, is that I still have to check every leader to manually identify the BIB and the LHR. I originally thought that type leg work was built into pymarc.
Frank

Andrew Hankinson

unread,
Apr 29, 2025, 9:22:30 AMApr 29
to pym...@googlegroups.com
It depends what you mean by "leg work." 

You could use the `type_of_record` property on the Leader object:


record_type = record.leader.type_of_record  # equivalent to record.leader[6]

What sort of "automatic" determination would you expect? 

-Andrew

--
You received this message because you are subscribed to the Google Groups "pymarc Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pymarc+un...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages