The order of the characters in the argument-2 parameter does not affect the outcome of the operation. The characters are a list of single characters. For example, FUNCTION TRIML(fld, "abc") will return the substring of fld that begins with any character that is not 'a', 'b', or 'c'. If fld contains "caxyz", FUNCTION TRIM(fld, "abc") will return "xyz". Characters can appear twice in the second parameter with no error. For example, FUNCTION TRIM(fld, "aba") is valid. This means the same as FUNCTION TRIM(fld, "ab").
If the second parameter of FUNCTION TRIM, TRIML or TRIMR is specified, blanks are not trimmed unless a blank appears as part of argument-2. TRIM, TRIML and TRIMR functions are not sensitive to mixed SBCS/DBCS strings, both argument-1 and argument-2 will be treated as SBCS if their class is alphanumeric.