Author Topic: Help! Moving Field  (Read 4859 times)

Douglas

  • Jr. Member
  • **
  • Posts: 27
    • View Profile
Help! Moving Field
« 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

jeffs42885

  • Guest
Re: Help! Moving Field
« Reply #1 on: October 31, 2011, 09:02:39 AM »
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??

Douglas

  • Jr. Member
  • **
  • Posts: 27
    • View Profile
Re: Help! Moving Field
« Reply #2 on: October 31, 2011, 09:59:20 AM »
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='===-==-=======')

Justin Derrick

  • IBM Content Manager OnDemand Consultant
  • Administrator
  • Hero Member
  • *****
  • Posts: 2230
  • CMOD Guru for hire...
    • View Profile
    • Tenacious Consulting
Re: Help! Moving Field
« Reply #3 on: November 01, 2011, 04:48:40 AM »
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.
IBM CMOD Professional Services: http://TenaciousConsulting.com
Call:  +1-866-533-7742  or  eMail:  jd@justinderrick.com
IBM CMOD Wiki:  https://CMOD.wiki/
FREE IBM CMOD Education & Webinars:  https://CMOD.Training/

Interests: #AIX #Linux #Multiplatforms #DB2 #TSM #SP #Performance #Security #Audits #Customizing #Availability #HA #DR

Douglas

  • Jr. Member
  • **
  • Posts: 27
    • View Profile
Re: Help! Moving Field
« Reply #4 on: November 01, 2011, 06:46:52 AM »
Please excuse my ignorance, but what do you mean by ?building a utility??

LWagner

  • Guest
Re: Help! Moving Field
« Reply #5 on: November 01, 2011, 08:23:28 AM »
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

Justin Derrick

  • IBM Content Manager OnDemand Consultant
  • Administrator
  • Hero Member
  • *****
  • Posts: 2230
  • CMOD Guru for hire...
    • View Profile
    • Tenacious Consulting
Re: Help! Moving Field
« Reply #6 on: November 01, 2011, 12:47:06 PM »
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.
IBM CMOD Professional Services: http://TenaciousConsulting.com
Call:  +1-866-533-7742  or  eMail:  jd@justinderrick.com
IBM CMOD Wiki:  https://CMOD.wiki/
FREE IBM CMOD Education & Webinars:  https://CMOD.Training/

Interests: #AIX #Linux #Multiplatforms #DB2 #TSM #SP #Performance #Security #Audits #Customizing #Availability #HA #DR

Douglas

  • Jr. Member
  • **
  • Posts: 27
    • View Profile
Re: Help! Moving Field
« Reply #7 on: November 02, 2011, 06:23:33 AM »
I tried adding the remove leading spaces to my ?Character Removal? , but it will not let me add spaces. :(


LWagner

  • Guest
Re: Help! Moving Field
« Reply #8 on: November 15, 2011, 04:23:52 PM »
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.