I haven't a clue what on earth you are trying to do/prove but this ain't the right way to go about it no matter what.
When you make the initial assignment you are performing a fixed char to fixed char move. So since zpmess trimmed is shorter than i.ljzvarchr the back end will be space filled. You have the field two characters shorter than it should be so there will be two random chars at the end.
When you set the length you cause RPG to space fill the whole back end again.
What you _should_ do to set the field (I don't know what it is called) is to say varFieldName = %Trim(zpmess);
That will set the length and everything else correctly.
Jon Paris
www.Partner400.com
www.SystemiDeveloper.com
On Jan 31, 2011, at 12:44 PM, rpg400-l-request@xxxxxxxxxxxx wrote:
i.ljzvarchr = %trim(zpmess) ;
// Length
i.ljzvarlen = %len(%trim(zpmess)) ;
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.