Page 1 of 1

Does AVI populate any Time Zone information in output field?

Posted: Thu Feb 11, 2016 6:20 am
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.

Posted: Thu Feb 11, 2016 3:25 pm
by ray.wurlod
I don't believe so.

Posted: Fri Feb 12, 2016 1:14 pm
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.

Posted: Fri Feb 12, 2016 2:03 pm
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!!

Posted: Fri Feb 12, 2016 2:34 pm
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]

Posted: Fri Feb 12, 2016 10:23 pm
by mahmudul
Appreciate it Robert. Thank you so much!!

Posted: Thu Feb 18, 2016 10:20 pm
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.

Posted: Fri Feb 19, 2016 7:07 am
by rjdickson
What do you see now?

Posted: Tue Mar 01, 2016 9:24 pm
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 :)

Posted: Tue Mar 01, 2016 10:22 pm
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.

Posted: Wed Mar 02, 2016 12:53 am
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...

Posted: Thu Mar 03, 2016 10:00 am
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 !!

Posted: Thu Mar 03, 2016 5:11 pm
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.

Posted: Tue Mar 08, 2016 10:31 am
by mahmudul
That works. Thanks!!