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.