LENV: Returning the Length of an Alphanumeric Field

How to:

LENV returns the actual length of an AnV field or the size of an An field.


Top of page

x
Syntax: How to Find the Length of an Alphanumeric Field
LENV(source_string, output)

where:

source_string

Alphanumeric of type An or AnV

Is the source string or field. If it is an An format field, the function returns its size, n. For a character string enclosed in quotation marks or a variable, the size of the string or variable is returned. For a field of AnV format, its length, taken from the length-in-bytes of the field, is returned.

output

Integer



Example: Finding the Length of an AnV Field

LENV returns the length of TITLEV and stores the result in a column with the format I2:

LENV(TITLEV, 'I2')

For ALICE IN WONDERLAND, the result is 19.

For SLEEPING BEAUTY, the result is 15.


iWay Software