User Tools

Site Tools


scratchpad:dmcmorris:retcon2codabar

Retrospective Conversion to CODABAR-standard barcodes

Purpose of this document

With Evergreen, the capability to cheaply and easily share the system among several libraries and library systems to build efficient resource-sharing consortia has a lot of advantages. However, libraries that migrate from an independently-maintained ILS into a shared ILS will likely run into duplicate barcode numbers. The industry-standard CODABAR barcode standard helps solve this issue, but requires item barcodes to be replaced with new. This [document/how-to/ideaprimer/holy grail] presents some brainstorming that you may consider when migrating to a new barcode format.

The CODABAR standard

The CODABAR standard implementation in libraries consists of a 14-digit string of numbers. The numbers' human-readable form often contains spaces to assist in reading and manual processing, but the computer will scan/process it as 1 long number without spaces.

The number format is as follows: A BBBB CCCCCCCC D where…

A=2 (to indicate an ITEM) or 3 (to indicate a PATRON)

BBBB=a 4-digit coordinated agency ID. This number can be anything from 0000 to 9999, thus allowing up to 10,000 agency specifications. Normally, a library will be assigned (or come up with) a unique agency ID. It is advised that these ID's are coordinated among several surrounding libraries in anticipation that these libraries will, one day, share your database.

CCCCCCCC=Sequence number. This number can be anything between 00000000 (8 zeros) and 99999999 (8 nines), which allows for 100,000,000 barcodes each for items and patrons per every agency.

D=Check-Digit. This is a number calculated mathematically by the remaining (IE: first 13) numbers of the barcode. The intention of checkdigits is to prevent erroneous reads of barcodes. Although normally there is no need to manually calculate checkdigits (IE: order barcodes or use software that does it automatically), here's how it's done:

Multiply digits in the odd places (IE: first...third...fifth......thirteenth) by 2
Subtract 9 from all double-digit products
Add the results (single digit products from step 1 and the new single digit numbers from step 2)
Add to this the digits from the EVENs place in the original barcode
Subtract this number from the next product of 10...

Example:

  2  1  2  5  9  8  7  6  9  8  7  6  1 x
x 2     2     2     2     2     2     2
===========================================
  4     4    18    14    18    14     2
-             9     9     9     9
===========================================
  4  +  4  +  9  +  5  +  9  +  5  +  2  = 38
+    1  +  5  +  8  +  6  +  8  +  6     = 34
                                         =====
                                           72
80-72=8; Final barcode=21259876987618

Prep work

Chances are, you will order pre-printed adhesive barcodes that simply stick to the item. Several library vendors offer these, and in different availabilities. Remember, you will need both item (2-) and patron (3-) barcodes. Determine how you want to position your item barcodes, and how many you want to use… Maybe you want to place one on the back page and one on the front page? Maybe just one on the front cover? Maybe you even want to put one one on the spine? This will figure out how to order them (single, pairs, etc…).

For patron cards, you can get cards with barcodes pre-printed, or adhesive barcodes very similar to what you may use on your items. If you have a large stock of existing barcodes (or you want to be able to have patrons re-use existing cards but with a new barcode). It's common to have multiple identical barcodes for patrons, especially in the case of a "wallet" card and a "keychain" card. Remember, even if you start with a small stock of adhesive barcodes, there's no reason why you can't switch later to cards having pre-printed barcodes on them.

Conversion methods

Portable smart device (Laptop, PDA, Telxon, etc)

If possible, a script or program to change the barcodes in your existing system would be desirable. This way, you can still be "live" with virtually no down time.

In general, you program a simple SQL UPDATE query to change the barcode number in the back-end. When you get to the item, simply scan the existing barcode then the new barcode. Once you have these 2 numbers, they're passed to the update script. It would probably be desirable to have a SELECT query also, so that when the first barcode is scanned you can easily ensure a proper scan (and, thus, a better likelihood in update success). You can then stick the new barcode over the old, or maybe you choose to stick it in a totally different spot to retain them both…

Batch Barcode

This is basically the same as the above method, but uses a "dumb" batch barcode reader… This [sh/w]ould be considered unreliable, as it's likely that one barcode would be scanned twice, thus causing an update failure… If you do this, it's suggested you do small batches (1-2 shelves) and that the updates are done in a transaction (if there's an update failure, a simple re-scan of the items is all that's needed).

Barcode printing

It's possible to print your own barcodes… If you have a portable device and label printer, you could change your existing barcodes to be CODABAR-compliant. For example, if you have a 7-digit sequence number (#######), can update this to 212590#######C. This could allow a rapid update in your database (a relatively simple script can update your barcode numbers). For items that make it to the desk without a new barcode, your printing device (with barcode conversion software) can just scan the old barcode and print a new one. This has the advantage that the barcode printer doesn't need to be network connected (just figure out the checkdigit, apply the right format, and send it away!). Keep in mind, however, that in-house printed barcodes are usually less reliable than those printed professionally, and may require additional protection).

Manual

Probably less-than-desirable for all except the smallest libraries… Manual conversion! This has the advantage that you can purify/standardize your records, but chances are everyone helping would be using their form of "correct".

Partial-convert, full later

If your system doesn't care about check-digits (or the check can be turned off), you can prefix your barcodes (in the database) with a number like 5#### (where #### is your agency code). This way, when a clerk comes by an old barcode, they type in the prefix (IE: 51259) and then scan the barcode. As these items come in, staff can replace this barcode with a "proper" barcode (covering or removing the old). This has the advantage of being simple and potentially helping find unpopular items (IE: items 2 years down the road that still have old barcodes haven't circulated…). However, this could cause quite a bit of dis-organization (if your item is returned at a "sister" library, they may have difficulty checking it in) and an extended workload on your staff…

Additional considerations

Additional people

When re-barcoding a collection (especially all at once), it will typically take a long time. Usually, a simple routine can be established that's easy to train volunteers with. Consider utilizing them! Check with your friends' organization, or "advertise" it… A lot of patrons' would be willing to donate a few hours to help improve their collection!

Marking of items

As you convert your items, it may be important to easily mark what's been done to easily eye what exists… This can be done easily by adding an indicator dot to the books' spine. 1/4" dots have been used, but often need to be used in conjunction with tape to prevent the dots falling off too easily…

RFID

What are the chances you'll be converting to RFID soon? Maybe in 5 years? 10 years? Consider getting pre-coded tags with the barcode printed on the front. This way, you're virtually ready to just install the scanners and other hardware, without having to convert _again_! Be warned that there are different RFID technologies, so look into it carefully! You may also wish to get standard adhesive barcodes for items you expect to discard within the next 5 years.

scratchpad/dmcmorris/retcon2codabar.txt · Last modified: 2022/02/10 13:34 by 127.0.0.1

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki

© 2008-2022 GPLS and others. Evergreen is open source software, freely licensed under GNU GPLv2 or later.
The Evergreen Project is a U.S. 501(c)3 non-profit organization.