Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to GS1 parse 01.10.17.21?

Tags:

2d

barcode

I have some products which have 2d GS1 bar codes on them. Most have the format 01.17.10 which is GTIN.Expiry Date.Lot Number.

This makes sense as 01 and 17 are fixed length, so can be parsed easily, just by splitting the string in the appropriate place.

However, I also have some in the format 01.10.17.21 (GTIN.Lot.Expiry.Serial Number) which doesn't make sense because Lot and Serial number are variable length, meaning I cannot use position to decode the various elements. Also, I cannot search for the AIs as they could legitimately appear in the data.

It seems that I've no way of reliably decoding this format. Am I missing something?

Thanks!

like image 930
tony.wiredin Avatar asked Sep 25 '13 16:09

tony.wiredin


1 Answers

According to the GS 1 website, "More than one AI can be carried in one bar code. When this happens, AIs with a fixed length data content (e.g., SSCC has a fixed length of 18 digits) are placed at the beginning and AI with variable lengths are placed at the end. If more than one variable length AI is placed in one bar code, then a special "function" character is used to tell the scanner system when one ends and the other one starts."

So it looks like they intend for you to order your AIs with the fixed width identifiers first. Then separate the variable-width fields with a function character, which it, appears is FNC1, but implementing that that will depend on the barcode symbology you are using, It may be different between DataMatrix, Code 128 and QR Code for example.

like image 136
Brian Anderson Avatar answered Sep 19 '22 11:09

Brian Anderson