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



We have a program on V5R3 with imbedded SQL that looks something like this:

EXEC SQL

SELECT MYVAL FROM MYTABLE

WHERE MYVAL BETWEEN :VAL1 and :VAL1 + 10 ;



It then proceeds to Fetch said value into VAL1.



(There's more to it but this is the area of focus.) Now, personally I
thought this would re-evaluate that BETWEEN value with each FETCH. But that
doesn't appear to be happening; if VAL1 is 5 when the process starts, it
will not fetch rows where VAL1 >= 15 - even if Val1 represents a series of
contiguous numbers in that table. This latter is the effect the programmer
wanted, but I distrust it (and don't like its inclarity in any case). I
thought it should keep going since 16 is between (the current VAL1) and (the
current VAL1+10).



Is this function operating by documented design? I've perused the SQL
manuals on this, but cannot seem to find a definitive description.



Thanks

Dennis E. Lovelady
AIM/Skype: delovelady MSN: fastcounter@xxxxxxxxxxxx
<http://www.linkedin.com/in/dennislovelady>
www.linkedin.com/in/dennislovelady --
No time spent with a cat on your lap, can ever be considered 'wasted.'




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.