Dear all!
My situation is..... I have a field (Sequence Number) which is a numeric-field (Len 6,0).
Now the records this field can accommodate is limited/restricted to a maximum of 999999.
This application has been running for years together now. Therefore the demand to accommodate maximum no. of records has come into being.
The client is very much concerned by this limit.
Now will changing this Field to a 6-digit char field instead of 6-digit numeric, solve the issue?(incidentally I came up with this idea).
But if we implement this idea; I don't know what will be the impact on the programs(as almost 90% of the programs use this Sequence Number).
Also I'm unaware as to how many records this field will accommodate?
for e.g. if we start with A00001 as the 1st record....continuing till A99999; then start with B00001......B99999; C00001.....C99999 & so on till it reaches Z99999;
Then again Start with "AA0001......AA9999; then continue with AB0001......till..AB9999; & so on till it reaches AZ9999;
Then Again start with AAA001.....AAA999; AAB001.....AAB999; AAC001.....AAC999; till it reaches AAZ999;
Then Again start with AAAA01.....AAAA99; AAAB01.....AAAB99; AAAC01.....AAAC99; till it reaches AAAZ99;
Then Again start with AAAAA1.....AAAAA9; AAAAB1.....AAAAB9; etc., till it reaches AAAAZ9;
----------------------------------------------------------------
I'm unable to visualize what other combinations can be possible like ABA001...ABA999; till it reaches ABZ999; then ACA001...ACA999; till it reaches ACZ999;...like that till AZZ999 etc., then again start with ABAA01...ABAA09 till ABAZ99; then again start with ABB001...ABB999 till ABZ999.
I need a logic how to build this? Any thoughts/help would be greatly appreciated.
Thanks
-Svanky

Software/Hardware used:

AS/400

Asked:
Last updated:

## Discuss This Question: 13 Replies

I have a field(Sequence Number) which is a numeric-field(Len 6,0).What kind of "numeric" field? Zoned or packed decimal? If The data type can be changed to handle characters, why can't it simply changed to be a larger number? Surely that would be easier with much less work. TomYou may also be a sequencing issue if you sort or key on this field. The letters A-Z come before 0-9.True, but alternate sequences can be defined and used. I'd expect that most users would quickly adapt to thinking of the letters as collating after digits. Where it would get tricky would be if positions after the left-most would need to be used in the future. It's possible only the left-most position would be needed. That position has cycled from '0' to '9' in its lifetime, i.e., ten different values. With 24 new values to use, the projected future life ought to be at least double what it's been so far. Tom- Svanky