Information icon IBM InfoSphere DataStage and InfoSphere QualityStage, Version 8.5
space Feedback

L

Extracts data that meets length criteria.

Syntax

L [ n [ ,m ] ]

n on its own is the maximum number of characters that the data must contain in order to be returned. If it contains more than n characters, an empty string is returned. If you do not specify n, or if n is 0, the length of the data is returned.

n, m specifies a range. If the data contains n through m characters it is returned, otherwise an empty string is returned.

Examples

The following examples show the effect of some L conversion codes with the Iconv function:

Conversion Expression
Internal Value
X = Iconv("QWERTYUIOP", "L0")
X = 10
X = Iconv("QWERTYUIOP", "L7")
X = ""
X = Iconv("QWERTYU", "L7")
X = "QWERTYU"
X = Iconv("QWERTYUOP", "L3,5")
X = ""
X = Iconv("QWER", "L3,5")
X = "QWER"

The following examples show the effect of some L conversion codes with the Oconv function:

Conversion Expression
External Value
X = Oconv("QWERTYUIOP", "L0")
X = 10
X = Oconv("QWERTYUIOP", "L7")
X = ""
X = Oconv("QWERTYU", "L7")
X = "QWERTYU"
X = Oconv("QWERTYUOP", "L3,5")
X = ""
X = Oconv("QWER", "L3,5")
X = "QWER"

PDFThis topic is also in the IBM InfoSphere DataStage Server Job Developer's Guide.

Update timestamp Last updated: 2010-09-30