PDA

View Full Version : Royal Mail Reference Numbers


Jon Finch
12-07-2006, 02:09 PM
A bit of a UK centric question, but if anyone round the globe can help, feel free!

Royal Mail Recorded/Special Delivery letters contain a thirteen digit references in the form AA xxxx yyyy zGB where AA is any two letters, xxxx and yyyy are four digit numbers, z is a single number and GB is always GB. I'm pretty sure that z is a check digit calculated from the rest of the reference but can't find out how its done.

Anyone know?

Michael Rowley
12-07-2006, 04:10 PM
Jon:

Anyone know?

I don't: but doesn't the Royal Mail site have any information on its numbers? The last digit is probably the check digit; does the way the ISBN check digit is derived give a clue? Suck it and see!

LoisWakeman
12-08-2006, 12:08 AM
Is this any help?

http://www.morovia.com/education/symbology/royalmail.asp

Jon Finch
12-08-2006, 09:26 AM
Many thanks for your responses Michael and Lois, but I eventually got to the bottom of it, as follows:-

Where used, the check digit shall be a single numeric digit calculated in accordance with the following algorithm:
– weight the digits in the serial number using the weighting factors 8 6 4 2 3 5 9 7 (that is, multiply the first digit by 8; the second by 6; the third by 4 and so on down to the last by 7);
– calculate the sum of the weighted values;
– divide this sum by 11 (eleven), obtaining the remainder ;
– subtract the remainder from 11;
– if the result is in the range 1 to 9, use the result as the check digit;
– if the result is 10, use 0 as the check digit;
– if the result is 11, use 5 as the check digit.
>>>

The algorithm is documented in UPU document S10d-5, page 3, section 5.3.3. S10d-5 may be downloaded from here. It is a 128-kilobyte MS Word document: www.upu.int/document... (http://www.bbc.co.uk/go/dna/mbarchers/F2693943/ext/_auto/-/http://www.upu.int/document/2003/an/cep_gan_ep_3-4/src/d012_ad00_an04_p00_r00.doc)

UPU is the Universal Postal Union www.upu.int/ (http://www.bbc.co.uk/go/dna/mbarchers/F2693943/ext/_auto/-/http://www.upu.int/)

That document is part of UPU standard 10, "Data definition and encoding standards". Wikipedia defines it as "a system for assigning 13-character identifiers to items for the purpose of tracking and tracing them during shipping" in its UPU S10 article here: en.wikipedia.org/wik... (http://www.bbc.co.uk/go/dna/mbarchers/F2693943/ext/_auto/-/http://en.wikipedia.org/wiki/S10_%28UPU_standard))

which I've posted in case anyone else needs to know!

Regards,

Michael Rowley
12-08-2006, 11:09 AM
Jon:

I've posted in case anyone else needs to know!

I'm glad you got the information that you wanted; but as a matter of interest, why should anyone want it (apart from the post office workers)? (Call me nosy!)

Jon Finch
01-03-2007, 01:15 PM
Michael,

We do a mass mail out of recorded delivery letters for one of our customers. The Royal Mail recorded delivery stickers are available from Royal Mail on rolls with consecutive xxxx yyyy numbers.

Royal Mail says that rather than write out all of the recorded delivery info by hand, it can be computer generated, but doesn't say how to calculate the z digit! Consecutive numbers are easy in a spreadsheet.

We can keep the roll and cross-refer from the spreadsheet to the roll to find out the z digit but it is so much easier if it is generated.


Funnily enough, I'd emailed the query to Royal Mail. Shortly after I posted the solution, a nice man phoned me up from Royal Mail and said that, yes, the z was a check digit but it was RANDOMLY generated, a contradiction in terms I think.

Anyway, I let him go on his way without letting on that I'd cracked it! I'm not sure whether he genuinely thought he'd given the right answer, didn't really know and fobbed me off with some guff, or whether it is a Royal Mail top secret.

Michael Rowley
01-03-2007, 03:30 PM
Jon:

We do a mass mail out of recorded delivery letters for one of our customers. The Royal Mail recorded delivery stickers are available from Royal Mail on rolls with consecutive xxxx yyyy numbers.

Thank you very much: I had imagined white-haired ladies sticking the recorded delivery labels on in village post offices!

The Royal Mail chap might have been letting the cat out of the bag by letting you know that the 'check' digit didn't mean anything, but was chosen at random. On the other hand, he might well have been talking out of his hat. The information you found seems much more plausible.