|
Rick, yes that is what I was looking for.
Can I change the existing time field before it is written within the
trigger?
Will just changing the value in the buffer do the trick or is there some
other method that I could use?
Neill, I am using a COBOL program wrapped around a CL program as the
trigger programs.
Yes John, given the 2nd option before, I could run into a situation
where the (time - 1) second rewrite would even be a duplicate, but not
likely.
Thanks.
James Salter
Systems Programmer
American Cast Iron Pipe Company
phone (205) 325-3033
fax (205) 307-3833
------------------------------
message: 5
date: Mon, 8 Dec 2008 17:23:26 -0500
from: "rick baird" <rick.baird@xxxxxxxxx>
subject: Re: Duplicate Keys
I could be wrong, but in a "before insert" trigger program, I was
almost certain we have the ability to alter the record data buffer
before it's passed to the database for insertion.
If that's the case, you won't have to modify or delete the existing
record, but instead change the time field in the data buffer.
On Mon, Dec 8, 2008 at 4:12 PM, Salter, James <JSalter@xxxxxxxxxx>
wrote:
Neill, it looks like I may have two options:that
1) There is an inventory update program that is the central program
would create the duplicates. I could check each time to verify thatthe
newly created record doesn't already exist (as a key) or I could delayduplicate
the job one second to create the unique-ness.
2) Inside a BEFORE INSERT trigger program check to see if the
exists (before writing the second record). If it does, then deletethe
1st record & rewrite it with a time of (time - 1) second. Then create_________Confidentiality Notice_______________________
the new record.
Thanks for your help. The 2nd would be the better option if there are
multiple programs creating these records.
This e-mail and any files transmitted with it is
confidential and is intended solely for the use of
the individual(s) or entity(ies) to whom this e-mail
is addressed. If you are not the intended recipient
or the person responsible for delivering the e-mail
to the intended recipient, be advised that you have
received this e-mail in error, and that any use,
disclosure, dissemination, forwarding, printing,
retention or copying of this e-mail is strictly
prohibited. If you have received this e-mail in
error, please immediately return this e-mail to
the sender and delete the e-mail from your system.
Thank you.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
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.