How to merge USADDR rule set's output field?
-
- Premium Member
- Posts: 32
- Joined: Fri Sep 26, 2003 3:45 am
How to merge USADDR rule set's output field?
As we know the output layout of USADDR standardize rule set as:
HN C 10 S HouseNumber
HS C 10 S HouseNumberSuffix
PD C 3 S StreetPrefixDirectional
PT C 20 S StreetPrefixType
SN C 25 S StreetName
ST C 5 S StreetSuffixType
SQ C 5 S StreetSuffixQualifier
SD C 3 S StreetSuffixDirectional
RT C 3 S RuralRouteType
RV C 10 S RuralRouteValue
BT C 7 S BoxType
BV C 10 S BoxValue
FT C 5 S FloorType
FV C 10 S FloorValue
UT C 5 S UnitType
UV C 10 S UnitValue
MT C 5 S MultiUnitType
MV C 10 S MultiUnitValue
BN C 30 S BuildingName
AA C 50 S AdditionalAddressInformation
AT C 1 S AddressType
NS C 8 X NYSIISofStreetName
SS C 4 Z ReverseSoundexofStreetName
UP C 30 S UnhandledPattern
UD C 50 S UnhandledData
IP C 30 S InputPattern
ED C 50 S ExceptionData
UO C 6 S UserOverrideFlag
In general, how do we use this standardized results? If we want to output the standardized result for getting connective address, can we merge these output bucket as 'HN:HS:PT:PD:SN:ST....' ? If results can be used as this way, how about the order of the merging?
I don't know how tho make use of the standardized results after USADDR rule set. Hope someone can help me.
HN C 10 S HouseNumber
HS C 10 S HouseNumberSuffix
PD C 3 S StreetPrefixDirectional
PT C 20 S StreetPrefixType
SN C 25 S StreetName
ST C 5 S StreetSuffixType
SQ C 5 S StreetSuffixQualifier
SD C 3 S StreetSuffixDirectional
RT C 3 S RuralRouteType
RV C 10 S RuralRouteValue
BT C 7 S BoxType
BV C 10 S BoxValue
FT C 5 S FloorType
FV C 10 S FloorValue
UT C 5 S UnitType
UV C 10 S UnitValue
MT C 5 S MultiUnitType
MV C 10 S MultiUnitValue
BN C 30 S BuildingName
AA C 50 S AdditionalAddressInformation
AT C 1 S AddressType
NS C 8 X NYSIISofStreetName
SS C 4 Z ReverseSoundexofStreetName
UP C 30 S UnhandledPattern
UD C 50 S UnhandledData
IP C 30 S InputPattern
ED C 50 S ExceptionData
UO C 6 S UserOverrideFlag
In general, how do we use this standardized results? If we want to output the standardized result for getting connective address, can we merge these output bucket as 'HN:HS:PT:PD:SN:ST....' ? If results can be used as this way, how about the order of the merging?
I don't know how tho make use of the standardized results after USADDR rule set. Hope someone can help me.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
It's probably easiest to reformat using a DataStage job.
This will stand you in good stead for the future, when QualityStage is much more tightly integrated with DataStage, and operators such as FFC disappear from QualityStage.
This will stand you in good stead for the future, when QualityStage is much more tightly integrated with DataStage, and operators such as FFC disappear from QualityStage.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Premium Member
- Posts: 32
- Joined: Fri Sep 26, 2003 3:45 am
Thanks for your mention and I know use the DataSatge for merging the job easily. Maybe I didn't say clearly about my question.
I hope to know whether we oftern use the USADDR output like this way? What else way for make use of the USADDR output resulte? Because I am a freshman of Qualitystage.
Thanks a lot!
I hope to know whether we oftern use the USADDR output like this way? What else way for make use of the USADDR output resulte? Because I am a freshman of Qualitystage.
Thanks a lot!
Re: How to merge USADDR rule set's output field?
Yes you can do!
Create a new field in dictionary file
I.E.
FullAddress C 100 S merging_all_address_fields
in the pattern file... inside the Post_process subroutine
make this rule as the first one.Dont add return command at the end
[ {HN} != "" | {HS} != ""] ; if any value populated in HN or HS then the below rule will be executed
copy {HN} temp
concat " " temp
concat {HS} temp
concat " " temp
concat {FullAddress} temp
copy temp {FullAddress}
you will get result as value of HN :HS
if you want to add any other value ,you can add in above rule.
I tested and it works..
Create a new field in dictionary file
I.E.
FullAddress C 100 S merging_all_address_fields
in the pattern file... inside the Post_process subroutine
make this rule as the first one.Dont add return command at the end
[ {HN} != "" | {HS} != ""] ; if any value populated in HN or HS then the below rule will be executed
copy {HN} temp
concat " " temp
concat {HS} temp
concat " " temp
concat {FullAddress} temp
copy temp {FullAddress}
you will get result as value of HN :HS
if you want to add any other value ,you can add in above rule.
I tested and it works..
stevenzhangshen wrote:As we know the output layout of USADDR standardize rule set as:
HN C 10 S HouseNumber
HS C 10 S HouseNumberSuffix
PD C 3 S StreetPrefixDirectional
PT C 20 S StreetPrefixType
SN C 25 S StreetName
ST C 5 S StreetSuffixType
SQ C 5 S StreetSuffixQualifier
SD C 3 S StreetSuffixDirectional
RT C 3 S RuralRouteType
RV C 10 S RuralRouteValue
BT C 7 S BoxType
BV C 10 S BoxValue
FT C 5 S FloorType
FV C 10 S FloorValue
UT C 5 S UnitType
UV C 10 S UnitValue
MT C 5 S MultiUnitType
MV C 10 S MultiUnitValue
BN C 30 S BuildingName
AA C 50 S AdditionalAddressInformation
AT C 1 S AddressType
NS C 8 X NYSIISofStreetName
SS C 4 Z ReverseSoundexofStreetName
UP C 30 S UnhandledPattern
UD C 50 S UnhandledData
IP C 30 S InputPattern
ED C 50 S ExceptionData
UO C 6 S UserOverrideFlag
In general, how do we use this standardized results? If we want to output the standardized result for getting connective address, can we merge these output bucket as 'HN:HS:PT:PD:SN:ST....' ? If results can be used as this way, how about the order of the merging?
I don't know how tho make use of the standardized results after USADDR rule set. Hope someone can help me.
vairamuthu
-
- Premium Member
- Posts: 32
- Joined: Fri Sep 26, 2003 3:45 am
-
- Premium Member
- Posts: 32
- Joined: Fri Sep 26, 2003 3:45 am
I created a new field in USADDR.DCT dictionary file:
FA C 100 S merging_all_address_fields
I add the action in USADDR.PAT as following:
\POST_START
NYSIIS {SN} {NS}
RSOUNDEX {SN} {SS}
COPY {SN} temp
CONCAT " " temp
CONCAT {ST} temp
CONCAT " " temp
CONCAT {UV} temp
COPY temp {FA}
\POST_END
But it couldn't work. Can it write in /POST_START?
Thanks
FA C 100 S merging_all_address_fields
I add the action in USADDR.PAT as following:
\POST_START
NYSIIS {SN} {NS}
RSOUNDEX {SN} {SS}
COPY {SN} temp
CONCAT " " temp
CONCAT {ST} temp
CONCAT " " temp
CONCAT {UV} temp
COPY temp {FA}
\POST_END
But it couldn't work. Can it write in /POST_START?
Thanks
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Premium Member
- Posts: 32
- Joined: Fri Sep 26, 2003 3:45 am
Sure!
We can do it as you said.
I only want to test the suggestion of vairus. I think it's a good idea and it will be useful for further using.
But I don't understand clearly:
varirus said: inside the Post_process subroutine
Is it means in /POST_START? Or I need to write another subroutine for the merging.
We can do it as you said.
I only want to test the suggestion of vairus. I think it's a good idea and it will be useful for further using.
But I don't understand clearly:
varirus said: inside the Post_process subroutine
Is it means in /POST_START? Or I need to write another subroutine for the merging.
hi,
you have to create a subroutine .Sorry i forgot to mention
make post_process call as last subroutine call in pattern action file after unhandled_modification
make it like below
CALL Post_Process
EXIT ;It will end the whole process.so you should make as last call
then you can place your subroutine code at last of your Pattern action file
\SUB Post_Process
;paste your code here
\end_sub
Regards
Vairus
you have to create a subroutine .Sorry i forgot to mention
make post_process call as last subroutine call in pattern action file after unhandled_modification
make it like below
CALL Post_Process
EXIT ;It will end the whole process.so you should make as last call
then you can place your subroutine code at last of your Pattern action file
\SUB Post_Process
;paste your code here
\end_sub
Regards
Vairus
vairamuthu
-
- Premium Member
- Posts: 32
- Joined: Fri Sep 26, 2003 3:45 am