RawLength Vs 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
vamsi.4a6
Participant
Posts: 334
Joined: Sun Jan 22, 2012 7:06 am
Contact:

RawLength Vs Len function

Post by vamsi.4a6 »

Difference between RawLength and Len function?

As far as i know RawLength function operates on Raw Data type and Len function operates on String data type.But i do not know what is meant by Raw Data type?Could anybody provide any sample data for Raw Data type to understand Raw Data type?
rameshrr3
Premium Member
Premium Member
Posts: 609
Joined: Mon May 10, 2004 3:32 am
Location: BRENTWOOD, TN

Post by rameshrr3 »

RawLength() returns number of bytes of data from a raw ( VarBinary/Binary ) data column. Len() returns number of characters - which can vary depending upon the encoding you use to store character data ( Single Byte or double byte etc) for a column.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

In DataStage BASIC (and therefore in sequences) you have ByteLen() rather than RawLength(). There is also LenDP() which is the length of a string in terms of the number of character positions needed to display it, catering primarily for double width characters encountered in some Asian character sets.
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