LENGTH

LENGTH returns an unscaled REAL FIXED BINARY value specifying the current length of x.
Read syntax diagramSkip visual syntax diagram
>>-LENGTH(x)---------------------------------------------------><

x
String-expression or an OFFSET reference with the LOCATES attribute and an explicit AREA reference. If x is binary, it is converted to bit string; otherwise, any other conversion required is to character string.

For an example of the LENGTH built-in function, refer to MAXLENGTH.

The BIFPREC compiler option determines the precision of the result returned.

When applied to an OFFSET reference with the LOCATES attribute and implicit AREA qualification:





Published: 23 December 2018