× 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.



That's a trick question. Yes and No. Depends on when/where you are
referring to using the 'trim',

If you are putting in hard-code values (or other varying fields) into a
varying field, the no, you don't need to trim.
varyingField = '123;
varyingField += '456;
javaObject = @buildString(varyingField);

Else, if the variables, you are putting into the 'varyingField', are not
varying, and well say are 25a, then yes you should.
d fld1 s 25a inz('123')
d fld2 s 25a inz('456')

varyingField = %trim(fld1);
varyingField += %trim(fld2);
javaObject = @buildString(varyingField);



David L. Mosley, Jr.
Technical Solutions Architect
Dancik International, Ltd.
2000 CentreGreen Way, Suite 250
Cary, NC 27513

www.dancik.com



ssc1478 <ssc1478@xxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
01/07/2010 04:19 PM
Please respond to
RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>


To
"RPG programming on the IBM i / System i" <rpg400-l@xxxxxxxxxxxx>
cc

Subject
Re: Creating java strings in RPG






On Thu, Jan 7, 2010 at 11:03 AM, James Perkins
<jrperkinsjr@xxxxxxxxx>wrote:

<snip>
I would personally just use a varying field in RPG then create the Java
string at the end when you need it.


ok, so I _can_ do that. I wasn't sure about that. If I use varying then
I
won't need trim, correct?

Thanks!

Phil

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.