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


  • Subject: Re: Character String help
  • From: Juice <juicenet@xxxxxxxxx>
  • Date: Wed, 04 Mar 1998 17:36:52 -0500
  • Organization: Crossroads Paging Network

if you can live with all numbers, just set up a control file or data
area
with the next number to use.  then chain to your parts file to make sure
it's not being used.
same thing could probably be done with alpha but you would have to build
some kind of table of letters to know which letter(character) is the 
next.  

ie  for 'ABC'  the next "number" would be 'ABD'.  just take the C off 
the end, use it to get the element number of the table, then use the
character in the next element ('D' in this case).  if you come to the 
end of the table, use the first element for the last character and then
use the same method to change the character before it.  so 'XYZ' would
become 'XZA'.  (assuming the lookup table starts with 'A' and ends with
'Y', 'Z'

i've never actually done this but it sounds like it should work.
hope it helps.


> 
> I have a character field used to identify our parts.  The majority of
> these values are numeric in value.  I'm wondering how we can auto-assign
> the "next number" the user should use when adding a new part.
> 
> Thanks for any tips!
> --------------------------------------------------------
> Kevin Baltus - Programmer/Analyst
> Gross-Given Mfg/AP International
> http://www.automaticproducts.com
>
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This is the RPG/400 Discussion Mailing List!  To submit a new         *
* message, send your mail to "RPG400-L@midrange.com".  To unsubscribe   *
* from this list send email to MAJORDOMO@midrange.com and specify       *
* 'unsubscribe RPG400-L' in the body of your message.  Questions should *
* be directed to the list owner / operator: david@midrange.com          *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.