|
Hi Max! > Your example clarified my confusion. Glad to hear that! I was kinda confused myself about everyone being so confused :-). > I guess I would question the business process rather than your code. > Why do you have gaps in your key ? Because sometimes I have to delete records by key and I don't want to shift the keys then. Maybe I _could_, for example "move" (assign keys) the highest record in place of the deleted one so I would always get a nice "row" of keys, but I'm not sure I want to do that. > Why not assign your key sequentially ? I could run out of keys real fast. > As long as you have gaps in your key and you want to assign the lowest > unused number, than you have to do what you are doing. Isn't there really any other way I could do that more easily? There should be I think... I actually thought that what I was trying to do was a "common task". > Unless, you > modify the program that is deleting your records, so that it saves the > deleted key in a file. Your program could then retrieve the lowest > unused key rather easily. That would be a bit of a hassle. But I'll think about it. It would use a lot of disk space... > I hope this helps. > Good luck. Thanks, Max, You did help. You clarified the situation a lot. Regards, Juris. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 mailing list archive is Copyright 1997-2025 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.