Integrity: Subfield Ranges

This forum is in support of all issues about Data Quality regarding DataStage and other strategies.

Moderators: chulett, rschirm

Post Reply
timwalsh
Participant
Posts: 29
Joined: Tue Mar 04, 2003 7:48 am

Integrity: Subfield Ranges

Post by timwalsh »

Does anyone have experience with Subfield Ranges.
I'm trying to write some standardizations for company names. I'm trying to make a more dynamic call for using code (a subroutine), that I already created in the Pattern Match file, for a slight variation of the same pattern.

Example:
Pattern A: ++A ( Where "+" is a word, and "A" is a standard company ending)
Example of Pattern A: General Electric Corporation
Pattern B: C++A (Where "C" is a common word like "THE", "OR", etc.)
Example: The Hartford Insurance Company

These patterns are very similar. I have a subroutine that standardizes names, including pattern ++A, what is a good way leverage my current code to just include the "C" to start the pattern?

Cheers,

Tim
timwalsh
Participant
Posts: 29
Joined: Tue Mar 04, 2003 7:48 am

Integrity: Subfield Ranges

Post by timwalsh »

Here was my personal fix:

First: Standard everything prior to the "C".
Second: Have a second sub routine or procedure that runs the following:

C | **
COPY_A [1] CNTemp
CONCAT " " CNTemp
COPY_S [2] CNTemp
CONCAT CSTemp CNTemp
COPY CNTemp {CN}
RETYPE [1] 0
RETYPE [2] 0
RETYPE [3] 0
RETURN

Use ** instead of (Beg:End) for sub ranging because subranges will remove the spaces between words. On page 1-39 of the documentation, it mentions that subranges removes the spacing between words.

Many thanks to Ascential Support's Mike Clancy for his input.

Tim
Post Reply