On 5/1/2014 2:18 PM, Colson, Edmund B wrote:
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.

Sorry, as this is the RDi list I thought it was a debugger question. My
best guess without seeing your code is that you are using fixed length
character fields. Fixed length fields are always full - they don't have
empty space on the end where one can append characters.

dcl-s test char(2048);

test = '12345';
// at this moment, 'test' contains 2048 characters.
// all but the first 5 of them are blanks.

test = test + '67890';
// this tries to add 5 more characters to the end, but it's
// already full. Probably want to trim the blanks off
// the end first.

test = %trimr(test) + '567890';
// at this moment, 'test' contains 2048 characters.
// all but the first 10 of them are blanks.

If this doesn't help, it's probably best to take it to the RPG or Cobol
list, as HLL programming isn't on topic here.

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.