Page 1 of 1

Removing of special keywords from a field

Posted: Thu May 29, 2008 7:14 am
by nasimul
Hi,
We need to remove keywords like Jr, Sr, II, III etc from a field.

For example:
"Richard Headley SR" should be changed to "Richard Headley"
"Richard SR Headley" should be changed to "Richard Headley"
"Sr Richard Headley" should be changed to "Richard Headley"
"Siva Sriram" should be kept as "Siva Sriram" -- Here we have "sr" but it didn't replace that.
"Sriram Krishnan" should be kept as "Sriram Krishnan"

Our requirement will have at least 50 diffrent keywords.
Please provide the way to implement this functionality.

Thanks,
Nasimul

Posted: Thu May 29, 2008 8:22 am
by ArndW
QualityStage will do this for you, and it is a part of the product at V8.

Re: Removing of special keywords from a field

Posted: Thu May 29, 2008 10:11 am
by vkhandel
Can u store all the keywords in a sequential file?

If yes, then u can write a Job Control (In a server job)... wherein u will traverse the sequential file in a loop (taking one keyword at each time) and storing it in the seesion.

Then, u can call a parallal job from the job control, which has in its input the keyword (already set in session)... and u can look for the keyword in the Transformer Stage using the Index command , which will return the position of the keyword in the string.... and if the search keyword is not found it will return 0.

So you have all records with index position of keyword, which can be removed using the field_name[index_position,length of keyword] command.

Posted: Thu May 29, 2008 3:39 pm
by ray.wurlod
U is not encountering the problem; Nasimul is.

The second person personal pronoun in Engish is spelled "you".