Consultor Eletrônico



Kbase P101530: Using cpinternal UTF-8 the LOOKUP function returns a success find when only a partial match is found
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   16/10/2008
Status: Unverified

FACT(s) (Environment):

OpenEdge 10.0B

SYMPTOM(s):


The LOOKUP function returns a success find when only a partial match is found.

Using cpinternal UTF-8

The following statement will return 3 when it should return 4:
LOOKUP('abc',"aaa,bbb,aaaabc,abc,def") .

CAUSE:

This is a known issue being investigated by Development

FIX:

Build a similar function and use it instead of the 4GL LOOKUP:
/*----*/
FUNCTION MYLOOKUP returns integer
(input ipcKeyVal as char, input ipcKeylist as char):
DEFINE VARIABLE i AS INTEGER NO-UNDO.
DO i = 1 to num-entries(ipckeylist):
IF entry(i, keylist) = ipcKeyVal THEN
return i.
END.
return 0.
END function.
/*----*/

It can be used like:
MYLOOKUP('abc',"aaa,bbb,aaaabc,abc,def").