clip()

The string-formatting function StrLib.clip deletes trailing blank spaces and nulls from the end of returned strings and can be used to test for NULL.

  StrLib.clip(text STRING in)
  returns (result STRING)
result
A character string.
text
A literal, variable, or expression that returns a character string of type CHAR.
If the build descriptor option itemsNullable is set to YES or if the field-level property isNullable is set to YES for an SQL record field, you can set NULL by assigning an empty string to the field; and you can test NULL by testing the result of passing the string to the function StrLib.clip:
  myString String = "";

  // indicates that the variable is NULL
  if (StrLib.clip(myString) is NULL)
    ;
  end

Related reference
EGL library StrLib

Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.