I understand that, but when I let the program run without having a monitor on the variable, the closing parenthesis is still not added. I get an SQL0104 error and the dump shows a variable with 2000 characters in size, but the parenthesis is still not added.

I appreciate the suggestion, Buck.


Barry Colson | Sr. Programmer, Shared Services | Community Health Systems
4000 Meridian Blvd | Franklin, TN 37067 | Tel: 615.628.6719 | Fax: 615.465.3026 | http://www.chs.net

-----Original Message-----
From: WDSCI-L [mailto:wdsci-l-bounces@xxxxxxxxxxxx] On Behalf Of Buck Calabro
Sent: Thursday, May 01, 2014 1:03 PM
To: wdsci-l@xxxxxxxxxxxx
Subject: Re: [WDSCI-L] Cannot append to a field

On 5/1/2014 1:20 PM, Colson, Edmund B wrote:
OK, guys. I have a program variable in an SQLRPGLE program I am debugging in RDi 9.0.1 defined as 2000 characters. I am loading this variable with an SQL statement to which I am appending " or CPINSD = XXX" where "XXX" is an alphanumeric number coming from a record in a file. The variable gets to a length of 1024 and I can't append the closing parenthesis to close the statement. I have proven that the length can't exceed 1024 characters by removing the last "or CPINSD = XXX" from the variable so the length is less than 1024 bytes, and the closing parenthesis is properly added to the variable. When I dump the program, the dump shows that the variable has 2000 characters allotted to it.
Is there some limitation that says that a variable in a program cannot exceed 1024 characters?

No, there is no 1024 limit, but the default Monitor setting is to only show the first 1024. An example of using your own size:

dcl-s testit char(2048);
%subst(testit: 1025: 4) = 'Buck';

In the Monitors view, I add an expression: testit:c 1032 (I only want to see 1032 characters.) Double click the monitored expression and out there near the end is 'Buck'. You can, of course, go all the way out to the declared size of the variable.

This is the Rational Developer for IBM i / Websphere Development Studio Client for System i & iSeries (WDSCI-L) mailing list To post a message email: WDSCI-L@xxxxxxxxxxxx<mailto:WDSCI-L@xxxxxxxxxxxx> To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/wdsci-l
or email: WDSCI-L-request@xxxxxxxxxxxx<mailto:WDSCI-L-request@xxxxxxxxxxxx>
Before posting, please take a moment to review the archives at http://archive.midrange.com/wdsci-l.

Disclaimer: This electronic message may contain information that is Proprietary, Confidential, or legally privileged or protected. It is intended only for the use of the individual(s) and entity named in the message. If you are not an intended recipient of this message, please notify the sender immediately and delete the material from your computer. Do not deliver, distribute or copy this message and do not disclose its contents or take any action in reliance on the information it contains.

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