can-do or look-up

Kalan

Member
Hi all,

I am trying to trace the required string in the comma separated concatenated string variables
(both the variables are longchar data type) using can-do or lookup. but receiving the below error.
[FONT=r_ansi][FONT=r_ansi]'Incompatible data types in expression or assignment. '

I have used 'char' data type variable as a parameters, since the concatenation list string value is big and raised the error
'REPLACE/CONCAT may not result in data > 32000 bytes. (11678)' In order to resolve this i preferred longchar data type.

Can someone pls advise on this?

Thanks.

[/FONT]
[/FONT]
 
The INDEX function can use LONGCHARs. You will need to ensure that both your source and target strings have leading and trailing separators.

Code:
DEF VAR lcc1 AS LONGCHAR INIT ",one,two,three,".
DEF VAR lcc2 AS LONGCHAR INIT ",two,".

MESSAGE INDEX( lcc1, lcc2 ) > 0.
 
The lookup function does support the longchar data-type, so i see no reason why to switch to the index function.
 
OP was using CAN-DO. There are two alternatives for CAN-DO:

1. lookup (of which the list can be a longchar, but the search string cannot)
2. index (of which both can be longchar)
 
Back
Top