OnDemand User Group
Support Forums => Report Indexing => Topic started by: DouglasSSA on October 31, 2011, 07:26:35 AM
-
Hello
I am an OnDemand Novice and I need some help please.
I have a field that is an SSN, and it usually is in the same location, but occasionally it moves over one character.
(For example)
1) Claim Number: 123-45-6789
Vs
2) Claim Number: 123-45-6789
(in example 2 there are 2 spaces between : and 1, while in example 1 there is only 1 space.)
Currently I have something like this:
FIELD1 = 0,14,15,(TRIGGER=2,BASE=TRIGGER)
TRIGGER2 = 8,*,X'C39381899440D5A4948285997A',(TYPE=GROUP) /* Claim Number */
Which works fine for example 1, but when I hit example 2 the value ?UNK? is stored.
Is there a way I can handle example 2 easily?
Thanks
-
Since you said that it is only ocassionally coming down like that, can you make a backup of your current index information, load the file with the new index information (Call this information the ocassional file that has the SSN out of place), and then revert back??
-
Hello & Thanks for the reply.
By ?Occasionally? I mean, in a batch of 1000 notices to be loaded, maybe 7 have the ssn in the improper location.
And it has to be done automatically.
I am looking for something similar to Trigger?s RECORDRANGE option
TRIGGER3 = *,35,X'C4C4C4',(TYPE=GROUP,RECORDRANGE=(09,13))
I have been looking into the OFFSET functionality, but no luck yet
FIELD1=*,*,15,(TRIGGER=2,OFFSET=(49:63,50:64),MASK='===-==-=======')
-
Hi Douglas.
In situations where there are data-quality issues, I normally push back to the provider of the data to correct their problem. Where that isn't possible, I usually end up building a utility to correct the issue.
I'd simply search for "Claim Number: " (with two spaces) and replace it with the same string, minus the rightmost space.
-JD.
-
Please excuse my ignorance, but what do you mean by ?building a utility??
-
Douglas:
If saving the SSN, back up the first byte position by 1 and read one extra character.
The in the Load Information Tab field for the SSN, remove leading and trailing spaces.
Larry Wagner
-
Please excuse my ignorance, but what do you mean by ?building a utility??
I'd write some software to correct the problem with Perl, sed, awk, or any other available scripting/programming language. That obviously depends on your platform, and what tools are available to you.
Having said that, Larry's solution is probably best - defining a wider-than-necessary field, then stripping additional spaces from before or after the value you want.
-
I tried adding the remove leading spaces to my ?Character Removal? , but it will not let me add spaces. :(
-
That restriction sounds like you are trying to change the application group. Too late to add it there.
You can update this on the Load Information tab beside the Indexer Information tab in the application update. Just find your SSN field there, and touch the space bar with the tab in Leading and Trailing fields of the charactrer removal section of the Preprocessor Parameters window.