|
On 11/21/2016 4:23 PM, Justin Taylor wrote:
I've spent two hours on this, and I figure it out five minutes afterposting the question. I guess I just needed to spell out the problem.
The 'cardboard analyst' strikes again :-)
http://imho.midrange.com/2005/12/18/cardboard-analyst/
I'm concatenating the column values together into a single varchar()variable. After each row is processed, I set the varchar() variable to
blank (myVar = *blank;). Apparently that also pads myVar with blanks so
the next time I try to append a new value (myVar += columnValue;) nothing
happens. I can't believe I've never encountered this before.
I got burnt by this long ago, when varying was first introduced. Harsh
lesson, but still never forgotten :-/
For those following along in the archives:
dcl-s thisVar varchar(25);
// load 25 blanks into thisVar
thisVar = *blanks;
// clear thisVar
thisVar = '';
--
--buck
Visit wiki.midrange.com and register for an account. Edit a page that
helps you, and because it's public, you'll help someone else, too!
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
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.