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



On Fri, Dec 4, 2015 at 5:38 PM, Stone, Joel <Joel.Stone@xxxxxxxxxx> wrote:
I have a length 4 alphanum field which I need to find the next value (incremented by one value).

To be precise, you need to say what all the possible values are for a
given byte. (For example, maybe you can use any of the 256 binary
values. Or maybe you can use anything printable. Or maybe just upper-
and lowercase characters, plus digits.) Your examples suggest that you
are working with uppercase letters and the ten decimal digits, for a
total of 36 possible values.

And my shop would like it done in COBOL, but any algorithm will suffice.

Maybe use a base 36 table???

You certainly could. Your problem is essentially the same as one
raised in this mailing list in June 2015 by Gad Miron. The thread
starts here:

http://archive.midrange.com/midrange-l/201506/msg00533.html

You could also search for "The case of outnumbered numerator". Gad
eventually wound up adapting the code provided by Sam L later in that
thread:

http://archive.midrange.com/midrange-l/201506/msg00584.html

John Y.

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.