how to know the size or end of position of a longchar variab

Posted by prajapati.puru on 25-Jul-2012 01:12

I do have a variable as longchar. Now i need to know the size(in bytes) or the end position of the content inside that longchar variable. Any help?

Thanks in advance

All Replies

Posted by Admin on 25-Jul-2012 01:31

The length of the String is returned by e ABL LENGTH () function. The exact number of bytes may vary from that when double-byte comes into play.

What exactly do you need to know the byte count for?

Worst-case COPY-LOB the LONGCHAR into a MEMPTR and use the GET-SIZE methods of that. But that will double the LONGCHAR in memory.

Posted by prajapati.puru on 25-Jul-2012 01:46

I do have a clob field on database which contain the content of txt files , now i want to show that in editor. Since the size of clob greater than 32 kb it shows Error 4043. What i am trying to do is to divide the content into multiple which is less than 32 kb and assign that into character variable and using INSERT-STRING i will show that into editor, I tried the length function but the value it gives didn't help . I am using substring function to divide so i need to find the end position.

Posted by Admin on 25-Jul-2012 02:01

LENGTH returns the total size of the CLOB.

To Create proper slices of the clob/longchar, use the SUBSTRING function.

But the Progress Editor Widget will never be able to visualize more then 32 k or 64 k of bytes (LARGE = TRUE on the Editor).

"When LARGE is FALSE, the Windows editor widget can hold 32K of text. When LARGE is TRUE, the Windows editor widget can hold over 64K of text—the precise limit depends on available resources."

This thread is closed