CONVERT Error

Infosphere's Quality Product

Moderators: chulett, rschirm

Post Reply
mdemerick@dow.com
Participant
Posts: 16
Joined: Thu Apr 03, 2008 9:45 am

CONVERT Error

Post by mdemerick@dow.com »

I have the following rule in a pattern file:

"> | .
COPY [1](n) tempnum
COPY [1](-c) tempalpha
RETYPE [1] ^ temp
RETYPE [2] + tempalpha
CONVERT [2] @MEASUREMENTS.TBL TKN T"

This should turn 5IN. into 5 IN with IN set to class T (since IN is found in the table).

Instead, I get an error:

"Standardization process failed.(Invalid entry in convert tbl
Error occured on line 50 of file ... SIZE.PAT
Offending convert tbl line: AMP

Pattern file line: CONVERT [2] @MEASUREMENTS.TBL TKN T"

AMP is one of the measurements included in the table, which is just a list of values.

Why would AMP be causing a problem like this? Am I using CONVERT incorrectly? This is my first time using it. Is there a way I can use the classification file again instead of convert? None of my meager references make note of how to do this.

Thanks.

Matt
mdemerick@dow.com
Participant
Posts: 16
Joined: Thu Apr 03, 2008 9:45 am

Post by mdemerick@dow.com »

I found a partial solution, but it still doesn't address my main concern.

"> | .
COPY [1](n) tempnum
COPY [1](-c) tempalpha
RETYPE [1] ^ temp
CONVERT tempalpha @MEASUREMENTS.TBL TKN T
RETYPE [2] + tempalpha"

This works much better, along with a correctly made converson table. But I still have the problem of the final token, of the measurement type, not being set to T. The RETYPE sets it to + instead. How do I get it set to T is it is in the table while still having it in the corect position for future processing?
mdemerick@dow.com
Participant
Posts: 16
Joined: Thu Apr 03, 2008 9:45 am

Post by mdemerick@dow.com »

I found a quasi-workaround for this. It's now split into two rules. The first sets it to + while the second rule uses the CONVERT action. It's ugly, but it works.

And yes, I did notice I was using temp instead of tempnum. That is also fixed. I'm still having a few problems, but need to go through them more to give a clearer picture of what's going on.
stuartjvnorton
Participant
Posts: 527
Joined: Thu Apr 19, 2007 1:25 am
Location: Melbourne

Re: CONVERT Error

Post by stuartjvnorton »

mdemerick@dow.com wrote: Instead, I get an error:

"Standardization process failed.(Invalid entry in convert tbl
Error occured on line 50 of file ... SIZE.PAT
Offending convert tbl line: AMP
Do you have AMP listed twice in the lookup table?
mdemerick@dow.com
Participant
Posts: 16
Joined: Thu Apr 03, 2008 9:45 am

Re: CONVERT Error

Post by mdemerick@dow.com »

[quote="stuartjvnorton"]

Do you have AMP listed twice in the lookup table?[/quote]

That was my first thought as well. Turns out I had it set up as a lookup table instead of a convert table. First time using a convert table, and it threw me off a bit.
Post Reply