Jim,
The definition of %trimr is locate at this site:
http://publib.boulder.ibm.com/infocenter/iseries/v5r3/index.jsp?topic=/books_web/c0925085631.htm
So the first function implicitly removes spaces, where the second function
explicitly removes backs.
Erick
----- Original Message ----
From: "jmoreno@xxxxxxxxxxxxxxxx" <jmoreno@xxxxxxxxxxxxxxxx>
To: RPG400-L@xxxxxxxxxxxx
Sent: Thursday, May 10, 2007 6:02:05 AM
Subject: %TRIMR Question
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.
As an Amazon Associate we earn from qualifying purchases.