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



"Fisher, Don" wrote:
>
> So the %TRIM is implied when concatenating fields into a VARYING field?
>

Don, it's not that the %TRIM is implied.  It's just that with varying
length fields, you (probably) wouldn't have any blanks that would need
trimming.

D varfld    s         10a   varying
D fld       s         10a   inz('12345')

c       eval   varfld = 'abc'
 * varfld has a length of 3, no trailing blanks

c       eval   varfld = 'abc '
 * varfld has a length of 4, 1 trailing blank

c       eval   varfld = fld
 * varfld has a length of 10, 5 trailing blanks

c       eval   varfld = %trim(fld)
 * varfld has a length of 5, no trailing blanks

So depending on how you loaded varfld in the first place, you may or may
not need a %trim when you do your concatenation.




As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.