The LENGTH() function

Informix®

Informix provides the LENGTH() function to count the number of bytes of a character string expression:

SELECT LENGTH("aaa"), LENGTH(col1) FROM table 

Informix LENGTH() does not count the trailing blanks for CHAR or VARCHAR expressions, while Oracle counts the trailing blanks.

Informix LENGTH() returns 0 when the given string is empty. That means, LENGTH('')=0.

SAP ASE

SAP® ASE supports the LEN() function, which is similar to Informix LENGTH().

The SAP ASE LEN() function ignores trailing blanks.

When passing NULL as parameter, the SAP ASE LEN() function returns NULL.

Solution

The database driver is able to replace LENGTH() by the LEN() function name.
The translation of LENGTH() expressions can be controlled with the following FGLPROFILE entry:
dbi.database.dsname.ifxemul.length = { true | false }
For more details see IBM Informix emulation parameters in FGLPROFILE.