× 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 believe it would be the same as not using the second parameter. From
the manual:

%TRIMR(string {: characters to trim})

%TRIMR with only one parameter returns the given string with any
trailing blanks removed.

%TRIMR with two parameters returns the given string with any trailing
characters that are in the characters to trim parameter removed.



On 5/10/07, jmoreno@xxxxxxxxxxxxxxxx <jmoreno@xxxxxxxxxxxxxxxx> wrote:


Hello RPG developers,

I have a question hoping that you will be able to help me

I came accross a piece of code that references this built-in function
%TRIMR
The software sends an email using the SNDDST command

Here it buids the string and tells the program how long the string is.
The question is ... Why the %TrimR portion is written as:

%TrimR(cmd: ' ')

It is my understanding that the %TrimR built-in function will
format the result string "with the right-blanks-trimmed"

Is the %TrimR(cmd) same as %TrimR(cmd:' ')

I am just no clear with this piece of code

Thanks for your answers



Here is the sample code - - - - - - -

CMD = 'SNDDST TYPE(*LMSG) TOINTNET(' +
%TRIM(PSAddr) +
') DSTD(''' +
%TRIM(PSDSTD) +
''') MSG(''' +
%TRIM(WKShortMsg) +
''') LONGMSG(''' +
%TRIM(WKLongMsg) +
''')' ;
CmdLen = %Len(%TrimR(cmd:' '));
QCMDEXEC(CMD:CMDLEN);



Jorge Moreno
Overseas Military Car Sales
Woodbury, New York

Confidentiality Notice:This email, including its attachments, may contain
information that is confidential and may be protected by federal and/or
state
laws and regulations, or other confidentiality privileges. This email,
including its attachments, may contain non-public information, therefore it
is
intended to be conveyed only to the designated recipient(s). If you are
not an
intended recipient, please delete this email, including its attachments,
and
notify the sender. The unauthorized use, dissemination, distribution or
reproduction of this email, including its attachments, is prohibited and
may be
unlawful.

--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.