Page 1 of 1

Datastage len function

Posted: Tue Mar 01, 2016 2:34 pm
by skathaitrooney
Hello experts,

I am not getting correct results when i use len function for a very large varchar field (35000 characters). It is workong for fields that are smaller in length. Any ideas if anyone has faved this issue? Any idea on any substitute for this?

Posted: Tue Mar 01, 2016 4:39 pm
by qt_ky
What results are you getting (error, zero, other wrong number), and out of curiosity, when do the incorrect results start coming (perhaps with any string over 32KB)?

Posted: Tue Mar 01, 2016 5:46 pm
by Mike
Also consider what NLS character set is used.

Are all characters a fixed number of bytes?

I believe the Len() function will be counting bytes rather than characters.

Mike

Posted: Tue Mar 01, 2016 9:21 pm
by ray.wurlod
Not true, Mike. Len() counts characters, ByteLen() counts bytes, and LenDP() counts display positions (for example for Chinese double width characters).

Posted: Tue Mar 01, 2016 10:09 pm
by chulett
But it seems to me the point about considering NLS still stands in a general discussion of the function.

And would still like to see the answer to qt_ky's questions.

Posted: Tue Mar 08, 2016 3:41 am
by skathaitrooney
I am getting a blank whitespace.

Posted: Tue Mar 08, 2016 8:57 am
by chulett
Sorry, meaning what exactly? :?

Posted: Tue Mar 08, 2016 2:53 pm
by ray.wurlod
Can you please attempt the same experiment using a Server job?