|
Scott, Thanks for the answer. I'm sure you are correct. BTW, the "Eval @lmsg = @lmsg + ..." is because this section of code is hit from inside a loop...the string is built over many iterations, then at the end (or when the string fills up), I'm sending an email of errors rather than an "error report". Scott Wrote: Because you're setting the variable to be 5000 blanks with Inz(*blanks) and then trying to add "Order #:", etc, after that point in the string. Since the string isn't longer than 5000 chars long, the characters after the 5000 blanks get dropped. The point behind varying strings is that you don't fill in every position in the string with blanks. You just fill in the area that you need, and since you don't have all those trailing blanks, you don't have to trim it, and therefore things run faster. But, since you're doing a inz(*blanks) you're filling it up with blanks, anyway... making it act (in this circumstance) the same way a non-varying field would. Also, why are you doing "@lmsg = @lmsg + ..."? Why not just do "@lmsg = ...."? In other words, why add to the end of @lmsg, instead of starting from the beginning? Maybe there's other code that adds text before that line does? On Mon, 16 Sep 2002, William A.(Tony) Corbett wrote: > Hi all, > Apparently, I do not understand the VARYING keyword. In Debug, after the > following code executes, when I do an F11 (display var) on @lmsg, it shows > all blanks. > > D @lmsg S 5000A Varying Inz(*Blank) > ............................................................ > C Eval @lmsg = @lmsg + 'Order#: ' + purchord + > C ', owner code not found for Member#: ' + > C @fmtcpy# + ':/N' > AS/Resources, Inc. William A.(Tony) Corbett IBM Certified Specialist - AS/400 Developer http://www.asresources.com corbett@asresources.com 770-587-4812 (office) 678-935-5006 (mobile) fax: 404-663-4737
As an Amazon Associate we earn from qualifying purchases.
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.