question regarding how to handle MARC21 records with no indicators.

8 views
Skip to first unread message

John David

unread,
Jun 24, 2026, 12:01:17 PM (9 days ago) Jun 24
to pym...@googlegroups.com, John David
Hello,

I am working on setting up a Koha Framework to support seed-libraries and seed-banks.  I am currently using PyMARC to build the equivalent of biographic records from databases of plant species.  Since the basic species information does not change, I am currently looking at using the Corporate Name (110) for analogy.  BTW, I have databases with 10's of thousands of native species, so I really do not want to build each of these by hand if I can help it...

While working on this I ran into an odd situation where the Koha Framework specification file I was using defined most of the indicators as '' (or NULL for unused).  This triggers warnings in PyMARC.  In the LoC MARC documentation they often use '#' for unused indicators, and reading through PyMARC's source code I see that it defaults to ' ' (or a <space>).  When I set it to a <space> I do not get any warnings, but the place where an indicator should be is set to '\'.  If I set it to '#', then I get '#'.  Here is an example of using a <space>:

=LDR  00282    a2200085   4500
=001  019ef740-7470-7b60-bc55-2cdda739f5c8
=003  Koha-Seed
=005  20260623213057.00
=110  \\$aSanguinaria canadensis L.$bbloodroot$0saca13$2plantsdb$6https://www.loc.gov/standards/sourcelist/taxonomic.html
=251  \\$a0.1$2Koha_Seed

What is the proper way to set an unused indicator.  BTW, all the documentation always appear to use '0' and '1' and not ' ' or something else.  Also, setting the undefiend to <backslas> can cause problems in formatting because on at least Linux systems a <backslas> is a character escape...

  Thanks, and best regards,

  EBo --

Geoffrey Spear

unread,
Jun 24, 2026, 12:36:08 PM (9 days ago) Jun 24
to pym...@googlegroups.com, John David
Unused/undefined indicators should be a blank space, " ". This prints in the string representation as \ because it's hard to see a blank space. LoC uses # for the same purpose in their MARC documentation, while OCLC uses a picture of a b with a line through it, which looks okay but can't be copied and pasted because it's an image file.

--
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/CAAF3RYscOyLamacpe3EX4m4ahByuaq2AP0ZZC1uiNqkoq5_uRg%40mail.gmail.com.

John David

unread,
Jun 24, 2026, 1:00:22 PM (9 days ago) Jun 24
to Geoffrey Spear, pym...@googlegroups.com
Thank you, Geoffrey, for the verification. I have (re)set the default to ' ' (<space>) for now, but will add a command-line option to set it to '#' if I or someone needs it later.

Also, thank you, and all the people that contributed to PyMARC.  You helped turn a fantasy project into something doable.  Before finding PyMARC I probably spent a couple of weeks pouring through the LoC documentation trying to figure out how to properly build a valid MARC record.  This has made that easy.

  Thanks again,

  EBo --
Reply all
Reply to author
Forward
0 new messages