Page 1 of 1

RawLength Vs Len function

Posted: Mon Jun 24, 2013 1:13 pm
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?

Posted: Mon Jun 24, 2013 1:29 pm
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.

Posted: Mon Jun 24, 2013 11:22 pm
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.