DSNH20289I INVALID STRING UNIT unit SPECIFIED FOR FUNCTION function-name

Explanation

The statement invoked a built-in function using a string length unit that is not valid with the type of data that is provided to the function. This can occur for the following reasons:
  • Binary data was specified with unit. CODEUNITS16, or CODEUNITS32 are not valid with binary string data.
  • Graphic data was specified with OCTETS as the string length unit. OCTETS is not valid with graphic data.

System action

The statement cannot be processed.

System programmer response

Change the invocation of the function to remove the invalid string length unit specification or change it to a valid string length unit for the data type being processed.