|
Charles,I read the manual. It didn't work. I am surmising that it was because it (the '+') is within a quoted string. I.e., anything within the quote marks are taken without translation or continuation. Makes sense (to me, anyway) that it would be this way because it's conceivable that one may actually want to include a '+' character.
Got another problem now, but I've yet to run it through debug. The job log led me to a "User Trace Dump" but, so far, it's Greek to me! I'll investigate as thoroughly as possible before I post anything here.
* Jerry C. Adams *IBM System i Programmer/Analyst B&W Wholesale Distributors, Inc.* * voice 615.995.7024 fax 615.995.1201 email jerry@xxxxxxxxxxxxxxx <mailto:jerry@xxxxxxxxxxxxxxx> Wilt, Charles wrote:
Glad to hear it. Tommy's response to this is the method I usually use. Just seems easier than looking up the continuation rules.But if I'm understanding the rules correctly, then HdrString = 'INSERT Into ' + %trim(Library) + '/' + %trim(HdrFile) + 'Values(?,?,?, +?,?)'; Should work just fine. (from the manual):* The first use of '+' in this example is the concatenation * operator. The second use is the character literal continuation. C EVAL ERRMSG = NAME + C ' was not found + C in the file.'Note, a plus (+) indicates continuation with the first non-blank character in or past the first position in the continued field. So you don't get any extra spaces. However, just an FYI but SQL would not have cared about the extra white space anyways. HTH, Charles Wilt -- iSeries Systems Administrator / Developer Mitsubishi Electric Automotive America ph: 513-573-4343 fax: 513-398-1121-----Original Message-----From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Jerry AdamsSent: Friday, July 28, 2006 12:57 PM To: RPG programming on the AS400 / iSeries Subject: Re: PREPARE Statement ProblemSomething was, indeed, wrong with the PREPARE statement. Or more precisely its placement.<snip>Just seems that, since it's part of a quoted string, there's no way to do the continuation with a '+' as it would think that (and the blanks) were part of the quote.
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.