× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



How many programmers are required to replace a light-bulb? None. It works on my machine. :-)

"It" is not the same thing in the working and failing scenarios. When EXECSQL gets invoked properly and the successful effect of establishing an SQLCODE transpires, then the expression ABS(SQLCODE) will be processing the "absolute value of a numeric string". When the invocation of the SQL does not establish the SQLCODE variable\value, the effect of the numeric scalar function ABS("SQLCODE") will fail with thee "bad arithmetic" error.

Using the condition "If RC<>0" is not a proper means to evaluate if the SQLCODE variable is a valid numeric\numeric-string value. Either that conditional logic or the later expression using SQLCODE, needs to establish that the SQLCODE value is numeric before using the SQLCODE value in a numeric evaluation\expression.

Note: Since the result of SQLCODE being non-numeric is an indication of a defect in the EXECSQL [i.e. unexpected result], I see little reason to change the code, I am just suggesting what is wrong with the code [in the failing scenario].

Regards, Chuck

On 1/3/11 10:41 AM, Luis Rodriguez wrote:

Nevertheless, it works for me (at least on V5R3)...

On Mon, Jan 3, 2011 at 2:00 PM, CRPence wrote:

On 1/3/11 8:23 AM, David FOXWELL wrote:

Luis, I think REXX is trying to be funny.

I typed : SAY SQLCODE

and guess what? It said SQLCODE.

How do I get it to output the value of SQLCODE?

Luis Rodriguez on 3 janvier 2011 16:31 wrote:

You are right, of course. I'm afraid I misread the
parenthesis's order.

I just ran his statements without problems. On the other hand,
it would seem as if SQLCODE had an invalid value (?). Time for
a SAY SQLCODE, perhaps?


That output is evidence there is no value assigned yet to the
variable SQLCODE; i.e. per no value, the string itself is output. That
is also an indication of why using the RC versus SQLCODE as a condition
to report the SQLCODE is the source of a bug in the original REXX source
statements.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.