|
Does someone have a brilliant suggestion to this scenario ???
Have a file (DB2/400) which receives records from programs in an ERP system, but also from other servers in the neighborhood using ODBC.
The file has a keyfield (RecID - 9,0). This keyfield should ofcause be unique, but when I receive records into the file via ODBC I have no control and right now I only receive *zeros in the field (RecID).
Then I thought... create a trigger program (RPG or SQL) and fire it *BEFORE an ADD to the file. Get the next number (last used RecID + 1) and return this value and initialize RecID with the new number !!!!
But I'm not sure this can be done.... seem to remember a trigger program cannot
return any parameters ??? !!!
Any comments or ideas ????
Btw: I haven't worked with triggers before ;-)
Regards,
Leif
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.