LENGTHB scalar function

The LENGTHB function returns the length of expression in bytes.

Read syntax diagramSkip visual syntax diagramLENGTHB(expression)

The schema is SYSIBM.

expression
An expression that returns a value that is a built-in data type.

The LENGTHB scalar function invoked with a character or graphic string as the argument is equivalent to invoking the LENGTH function with OCTETS specified. The LENGTHB scalar function invoked with any other data type as the argument is equivalent to invoking the LENGTH function without a string units argument.