The TRIML function returns the given string with any leading blanks removed, or the given string with any leading specified characters removed.
The type of the function is alphanumeric, DBCS or national depending on the class of its argument.
Format: >>-FUNCTION TRIML--(--argument-1--+------------+--)------------>< '-argument-2-'
If argument-2 is not specified, the returned value is an alphanumeric, DBCS or national character string consisting of the characters of argument-1 with any leading blanks removed. The blank character is a one byte space character (' ' or X'40') when argument-1 is of class alphanumeric, or one double-byte space (X'4040') when argument-1 is of class DBCS, or one national space (X'0020' or X'3000') when argument-1 is of class national.
If argument-2 is specified, the returned value is an alphanumeric, DBCS or national character string consisting of the characters of argument-1 with any leading characters specified in argument-2 removed.
The length of the returned string depends on the content and the class of argument-1. It is the length of the returned string in number of character positions. If argument-1 is a DBCS or national data item, then the length is in DBCS or national character positions.
For more information on returned values and examples, see TRIM.