[Info-vax] SSN Validation (was: Re: Re: Modern software development for VMS, was: Re: source control and semantics (Re: Why so much Unix envy?))

Norm Raphael norman.raphael at verizon.net
Mon Sep 15 17:20:19 EDT 2014


 > On 09/15/14, Shark8<OneWingedShark at gmail.com> wrote:
 > 
> On 9/14/2014 9:40 AM, David Froble wrote:
> > What's wrong with directories containing source files, build files, and
> > such?
> <snip>
> Or, a bit more on the mundane side, consider DB-applications and 
> ensuring [DB] consistency and proper-processing; you could use the 
> following to ensure that (a) all SSNs are correctly and consistently 
> formatted.
> <snip>
> > -- SSN format: ###-##-####
> > Subtype Social_Security_Number is String(1..11)
> > with Dynamic_Predicate =>
> > (for all Index in Social_Security_Number'Range =>
> > (case Index is
> > when 4|7 => Social_Security_Number(Index) = '-',
> > when others => Social_Security_Number(Index) in '0'..'9'
> > )
> > );

(a) You forgot that no SSN can begin with 000, 666, or 900-999, and 
(b) digits 4-5 cannot be 00, not can digits 6-9 be 0000.

Moreover, for SSN's issued before June 25, 2011, there is a 
published "high group list" http://www.socialsecurity.gov/employer/ssns/HGJune2411_final.txt
which shows the highest issued digits 4-5 for any digits 1-3, if you really want to check (After 
that date SSN's were randomly issued, but with restrictions (a) and (b) retained.) From that table, 
nothing over 772 for digits 1-3 was issued.

There are earlier "high group lists" available if you want to check by issue date in conjunction 
with birth date, but since SSN's were not issued at birth, this would lead to eliminating some 
errors, but not verifying all entries.

 
 
 
 Norman F. Raphael
"Everything worthwhile eventually 
degenerates into real work." -Murphy




More information about the Info-vax mailing list