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



Peter,

So it's the AA01 - ZZ99 bit that will change? What happens if you try to
exceed that limit? Can the first two characters (i.e. characters 3 and 4 in
the field name) ever be numeric? Can the last two ever be alpha? If the
answer to both questions is no, then the following would work (I think):


D Field DS
D Char 1A Dim(7)
D Chars C 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
D Nums C '0123456789'
D Check S 26A Varying

for x = 6 downto 3;
if x > 4;
Check = Nums;
else;
Check = Chars;
endif;
p = %scan( Char(x) : Check );
if p < %len( Check );
Char(x) = %subst( Check : p + 1 : 1 );
leave;
else;
Char(x) = %subst( Check : 1 : 1 );
endif;
endfor;

On Fri, May 23, 2008 at 9:29 AM, Peter Vidal <Peter_Vidal@xxxxxxxx> wrote:

"Basically, you'd start off with MAAAAAA0 and then it would go to MAAAAAB0
and so on. When it gets to MAAAAA90, it then goes to MAAAABA0, then
MAAAABB0 and so on."

I have this program version ready to test but I need to restate the range
of numbers that I want to focus on. First thing is that I specified
before that my concerned positions were 2-6 but it should be 3-6 and I
apologize for that. Second, my issue is that I am trying to deal with the
creation of new order numbers and the position of the characters is
important (in my case). I HAVE to start in MTAA010 and HAVE to end with
MTZZ990. The configuration of my order number is as follows:

* First char (M) means that this is a manufacturing order
* Second char (T) means the plant location I want to focus on
* Positions 3-6 are the positions I need to increment the sequence in
* Last position (Pos 7) will always be zero (0).

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.