Datastage len function

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
skathaitrooney
Participant
Posts: 103
Joined: Tue Jan 06, 2015 4:30 am

Datastage len function

Post 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?
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post 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)?
Choose a job you love, and you will never have to work a day in your life. - Confucius
Mike
Premium Member
Premium Member
Posts: 1021
Joined: Sun Mar 03, 2002 6:01 pm
Location: Tampa, FL

Post 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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Not true, Mike. Len() counts characters, ByteLen() counts bytes, and LenDP() counts display positions (for example for Chinese double width characters).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
skathaitrooney
Participant
Posts: 103
Joined: Tue Jan 06, 2015 4:30 am

Post by skathaitrooney »

I am getting a blank whitespace.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Sorry, meaning what exactly? :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Can you please attempt the same experiment using a Server job?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply