LENGTH function and errors

Posted by ericg on 26-Feb-2009 17:37

Hi there. I am using LENGTH() on a COM-HANDLE object property. But the size is large and I get the following: "SYSTEM ERROR: copditm -- maxdlen, data item too large, try to increase -s. (65)". I tried setting the -s parameter to 128 but I still get the error and I know the object is only 98KB. I also tried to suppress any error on the statement but still get error. I have this:

ASSIGN intLength = LENGTH(objMessage:text) NO-ERROR.

Any suggestions?

All Replies

Posted by Admin on 27-Feb-2009 00:25

What data-type does the com object viewer show for that text property of your object?

Looks like it's interpreted as char rather than long-char and then there is a 32k limit. Can you try a size less that 32k or use an intermediate character variable?

Posted by ericg on 27-Feb-2009 12:59

Hi Mike. I am using version 9 so I do not have access to LONGCHAR. I also get the error when trying RAW. However I found a solution by accessing the object's SIZE property. Then if the size is small enough I can then use LENGTH. Take care.

Posted by Thomas Mercer-Hursh on 27-Feb-2009 13:39

Without LONGCHAR, I don't see how you expect to do much with a 96KB string unless you put it in a memptr or parse it into pieces or something.

Another good reason to upgrade.

Posted by ericg on 27-Feb-2009 14:22

We are in the process of re-engineering against a 10.1C backend and a .NET client. But I also have to maintain the legacy.

This thread is closed