Does AVI populate any Time Zone information in output field?

Infosphere's Quality Product

Moderators: chulett, rschirm

Post Reply
mahmudul
Participant
Posts: 15
Joined: Fri May 07, 2010 8:57 pm

Does AVI populate any Time Zone information in output field?

Post by mahmudul »

I am creating a job to clean addresses and then conform to USPS Postal Standard. Can I use AVI to cleanse and correct data to Postal Standard?

Also - can we get output fields from AVI with time zone (i.e. Eastern, Central, UTC/GMT) information?

Thanks in advance.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I don't believe so.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
rjdickson
Participant
Posts: 378
Joined: Mon Jun 16, 2003 5:28 am
Location: Chicago, USA
Contact:

Post by rjdickson »

AVI does apply local postal standards (i.e. German addresses formatted the way Deutsche Post wants, US addresses formatted the way USPS wants it, etc).

And Ray is correct - AVI itself does not output any time information. However, you could get the current time and add that as a column in the output yourself using a QualityStage Transformer, Column Generator, or various other ways.
Regards,
Robert
mahmudul
Participant
Posts: 15
Joined: Fri May 07, 2010 8:57 pm

Post by mahmudul »

Thanks Ray and RJDickson!! I would have another question.....do you know if there in any pattern action code I can add to USNAME.PAT file to get the string after the * (Asterisk)? For Instance....

*** USE ABC # 123 *** NEW YORK

I like to store the information after last asterisk (i.e. NEW YORK) in AdditionalName_USNAME field. What code should I use in the Pattern Action file?

Thanks in advance!!
rjdickson
Participant
Posts: 378
Joined: Mon Jun 16, 2003 5:28 am
Location: Chicago, USA
Contact:

Post by rjdickson »

Well, you already have * in the striplist and striplist, so asterisks are not ever seen. You would have to remove the * from the striplist in order to see them. IF you decide to do this, please perform a full regression test to make sure you have not negatively impacted your ruleset.

Having said that, assuming you DO remove asterisk in the 'striplist', you can do:

Code: Select all

#\* | **             ; The last asterisk, followed by anything, eg: *** USE ABC # 123 *** NEW YORK 
COPY_S [1] {OutData} ;NOTE: Normally this would be [2], but this is a workaround because of the #\*
RETYPE [1] 0         ;NOTE: Normally this would be [2], but this is a workaround because of the #\*
The tricks are:
1) '#', at the beginning means to 'scan from right'
2) You need to 'escape' the special character (the *)
3) Use a workaround to treat your data as [1] instead of [2]
Regards,
Robert
mahmudul
Participant
Posts: 15
Joined: Fri May 07, 2010 8:57 pm

Post by mahmudul »

Appreciate it Robert. Thank you so much!!
mahmudul
Participant
Posts: 15
Joined: Fri May 07, 2010 8:57 pm

Post by mahmudul »

Thanks for your help. I need little more help from you.....

#\* | ** ; The last asterisk, followed by anything, eg: *** USE ABC # 123 *** NEW YORK
COPY_S [1] {OutData} ;NOTE: Normally this would be [2], but this is a workaround because of the #\*
RETYPE [1] 0 ;NOTE: Normally this would be [2], but this is a workaround because of the #\*

How can I produce STANDARDIZED version of OutData?

For example, If I have *** USE ABC # 123 *** COTON & WELSH , INC .

I should see COTON AND WELSH as OutData.
rjdickson
Participant
Posts: 378
Joined: Mon Jun 16, 2003 5:28 am
Location: Chicago, USA
Contact:

Post by rjdickson »

What do you see now?
Regards,
Robert
mahmudul
Participant
Posts: 15
Joined: Fri May 07, 2010 8:57 pm

Post by mahmudul »

I see COTON & WELSH , INC . as OutData.

I anticipate to see COTON AND WELSH as OutData
and, INC as NameSuffix_USNAME

Basically, whatever we are putting in OutData should be Standardized again. Therefore, COTON & WELSH , INC needs to be standardized by USNAME rule set after the ** are removed by the code you already suggested.

Thanks in advance :)
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

", INC" will never be standardized by USNAME into the main name field. You can use a downstream Transformer stage to append the Name suffix if that's what you require.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
rjdickson
Participant
Posts: 378
Joined: Mon Jun 16, 2003 5:28 am
Location: Chicago, USA
Contact:

Post by rjdickson »

What you are asking for is not recommended. What if you have 'abc supply Corp ** cotton & Welch, Inc' as your data? You would overwrite Corp with Inc.

Is it really two different companies, or one? You could send the additional name into another standardization stage if you wanted...
Regards,
Robert
mahmudul
Participant
Posts: 15
Joined: Fri May 07, 2010 8:57 pm

Post by mahmudul »

Basically my scenario is like......

There are either "DO NOT USE" or "ONLY USE" before the **
I am using your code and successfully able to store whatever I have after ** into OutData field or PrimaryName_USNAME in my mapping.

Therefore, **Do Not Use** cotton & Welch, Inc will give me
Cotton & Welch, Inc into Outdata or PrimaryName_USNAME in my mapping.

What I am trying to achieve is below....

The OutData/PrimaryName_USNAME in my mapping should also be standardized like below....

COTTON AND WELCH ---> PrimaryName_USNAME
INC ---> NameSuffix_USNAME

Thank you both Ray and RJDickson in advance !!
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Perhaps this would be more easily solved using two Input Text Overrides to RETYPE the "offending" items to the NULL class (0), so that the rule set can properly process the remainder.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
mahmudul
Participant
Posts: 15
Joined: Fri May 07, 2010 8:57 pm

Post by mahmudul »

That works. Thanks!!
Post Reply