|
I have a routine to kinda/sorta validate Social Security numbers. There are some obvious bad combinations. Here it is: * Social Security Number broken down into parts D DS Inz D Key_Ssn 9 0 D Area 3 0 Overlay(Key_Ssn) D Group 2 0 Overlay(Key_Ssn:*NEXT) D Serial 4 0 Overlay(Key_Ssn:*NEXT) D SSN_Ok N Inz(*OFF) * Determine if SSN is valid. * Use the Social Security Number as the customer number if SSN is valid. * (within proper range, and none of the groups are zero, plus other conditions). * Combinations always invalid (from http://www.searchbug.com/peoplefinder/ssn-invalid.asp): * Area Number 550, Group 19 (e.g., 550-19-SSSS) * Area Number 586, Groups 19, 29, 59 and 79-99 (e.g., 586-29-SSSS, 586-81-SSSS) * Area Number 666 (never has been and never will be issued) * Area Numbers 900-999 (not valid SSNs, but were used for program purposes when * state aid to the aged, blind and disabled was converted to a federal program * administered by SSA) C Eval Ssn_Ok = (Not (Area = *ZEROS Or Group = C *ZEROS Or Serial = *ZEROS Or (Area = 550 C And Group = 19) Or Area = 666 Or Area >= C 900 Or ((Area = 586) And ((Group = 19) C Or (Group = 29) Or (Group = 59) Or C (Group >= 79)))))) Francis Lapeyre IS Dept. Programmer/Analyst Stewart Enterprises, Inc. E-mail: flapeyre (at) stei.com -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Rich Duzenbury Sent: Tuesday, November 9, 2004 3:40 PM To: RPG programming on the AS400 / iSeries Subject: Re: Memory Allocation Question On Tue, 2004-11-09 at 15:28, Tony Carolla wrote: > Thanks Rich. > > My second attempt (which I didn't tell about -- I was trying to avoid > a novel ;) did just that. I made a discovery though, that over 50% of > people have the same ss# -- Zero. Right, the SS index should not include records where the SS is 0, 0 means not given. Course on the systems I work on, the SS is required, so the bogus records have a SS# = 1. Anyway, simply create the SS logical with a select/omit criteria, and only select those records that have an SS. Same for birthdate, btw. I think you will be able to save *many* I/O's and much processing time by using the three indexes idea. -- Regards, Rich Current Conditions in Des Moines, IA Broken Clouds Temp 62.6F Winds out of the Southwest at 16mph -- This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.