Re: COBOL (Fujitsu v3) Data validation.

From: James J. Gavan (jjgavan_at_shaw.ca)
Date: 11/20/03


Date: Thu, 20 Nov 2003 00:32:52 GMT


JerryMouse wrote:

>
> As an aside, I saw a report that some states encode your NAME as part of
> your driver's license number! They use a variation of a soundex code so that
> attempts to present a fraudulent or modified license can be detected by
> those in the know (bartenders, police, etc.).
>
> What bugs me is account numbers that are 22 digits long. That's enough
> numbers to give every person and animal on the planet 1,000 numbers each. I
> think our FedEx account is like 12 digits (where our UPS account is six).
> Apparently not all programmers went to the same school.

I'll offer a *possible* historical reason on your last comment. Way before
computers, accountants dreamed up numbering systems to convey a logic for
General Ledgers, Receivables, Payables etc. Remember there were no IT people
around - so much of their numbering system techniques carried over initially
into punch-cards, and then EDP proper.

Practical example - Unigate the dairy company I was with back in '63 - our first
application - computerize invoicing. A Product Catalogue - we started from
scratch as one didn't exist - format : nn nn X; get products in an alpha
sequence - first 'nn' = page and second 'nn' = line; using Mod 11 the "X" truly
could be an "X" :-)

Now the account numbers for Sales Ledger/Receivables were a done deal. They had
purchased from an outside source something called a '500 Alpha Split', based on
the frequency of names in UK - back then no need to worry about Li, Lee, Ng,
Chung etc., although the letter "M" was heavily weighted, particularly with the
Mcs and Macs. From memory, sort of worked like the following :-

001 - AA
010 - AB

So you want to designate Abercromby and Sons Ltd. :-

010-009 - the '9' being the next available number in that group. Not totally
alphabetical, but 'close' based on first three digits. They had a huge A/R
section so as well as some form of analysis they wanted to segregate parts of
the UK by giving accounts an alpha prefix. The only one I remember was "G" for
Wales - that's daft - why didn't they pick on "W" for Welsh Wales :-)

so now we have G-010-009 Abercromby and Sons Ltd.

Then along come us new computer kids. Above is OK for invoicing to an account,
but what about the branches we actually deliver to. Playing it safe we came up
with a further 4 digits. Not unreasonable - I'd guess Safeway, Tesco, Sainsbury
etc., each have in excess of 1,000 branches in UK. And although we were paper
tape punching and verifying we latched on to this new thing 'check digits'. So
we used Mod 11 which could also give us an "X".

G-010-009-0001-X Abercromby and Sons Ltd. - 33 High Street, Cardiff
G-010-009-0002-3 Abercromby and Sons Ltd. - 44 Temple Street, Swansea
G-010-009-0003-7 Abercromby and Sons Ltd. - 2A Gwffid Road, Carmarthen

12 characters in total. Sure we could probably have dreamed up something a
little 'slicker', but 'if it aint broke, don't fix it'. And I've no doubt we
would have had stiff resistance from the accounting people to make a dramatic
change to something that was working. As it was we had to stave off a bid by
some silly bugger to add a three-digit salesman's number to the above account !

It's just like those system flowcharts of an application. You can look at the
flow and query, "Now why the hell did they put that process in that particular
spot ?". Inevitably there is an historical practical reason for doing it the way
chosen.

As for your 22 digits - back like 20 years ago attended a session where a
software company was promoting their G/L package. Can't remember - let's say
their Chart of Accounts allowed for 15 digits. "Not good enough for us", pipes
up somebody from the Alberta Government, "We use FORTY digits".

Jimmy