LNOT

The LNOT function returns a string that is the logical NOT of the argument string.

Read syntax diagramSkip visual syntax diagramLNOT (expression)
expression
An expression that returns a value of any built-in numeric or string data type, but cannot be LOBs. The arguments cannot be mixed data character strings, UTF-8 character strings, or graphic strings. A numeric argument is cast to a character string before evaluating the function. For more information about converting numeric to a character string, see VARCHAR.

The data type and length attribute of the result is the same as the data type and length attribute of the argument value. If the argument is a varying-length string, the actual length of the result is the same as the actual length of the argument value. If the argument can be null, the result can be null; if the argument is null, the result is the null value.

The CCSID of the result is 65535.

Example

  • Assume the host variable L1 is a CHARACTER(2) host variable with a value of X'F0F0'.
      SELECT LNOT(:L1)
        FROM SYSIBM.SYSDUMMY1
    Returns the value X'0F0F'.