|
Buck Calabro wrote:
I have a physical file that will hold
gas type information, but one of the
fields needs to be an integer id field.
Search the archives for SQL IDENTITY and you'll probably come up with a bunch of useful examples. http://archive.midrange.com There are several native RPG ways to go about this.
1) Use a data area to store the last number used *lock in lastno add 1 lastno out lastno
2) Get the highest key by looking at the last record *hival setll readp add 1 key ...
3) Store the last number used in another database file
Hope this gets you started. --buck
As an Amazon Associate we earn from qualifying purchases.
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.