× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I have been testing the new %Trim second parameter featured in V5R4. I have an application where I could trim stray period characters. The example I was given from another programmer who uses this is blanks, `/` and `\`. I wrote a test program and coded this:

// Trim To Remove The Listed Characters
TRIMOUT = %Trim(TRIMIN :' .\/'); // Trim Blank, Period, Slashes

I keyed some test data into a file and this was the result:

12 45\67/ 12 45\67 removed the trailing '/'
1/1\2 1/1\2 removed nothing
112 33\44\ 112 33\44 removed trailing '\'
///\1234.56 1234.56 removed all slashes
987.654 987.654 removed nothing


Something is working part of the time. I have been unable to locate an example other than what was listed in the official announcement:

Second parameter for %TRIM, %TRIMR and %TRIML indicating what characters to trim:
%TRIM is enhanced to allow an optional second parameter giving the list of characters to be trimmed.

Assistance, please.

Thanks,



Robert Munday
Munday Software Consultants
Montgomery, AL
on assignment in Jacksonville, FL



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.