On Thu, Aug 20, 2009 at 2:51 PM, Bob Cancilla<bob.cancilla@xxxxxxxxx> wrote:
Your point on a user canceling their order and having to write logic to back
out updates in several places is a really excellent one.  Why write the code
when you simply use a rollback.

Actually, I was thinking about a user or admin doing an ENDRQS or ENDJOB *IMMED.

While the idea of using commitment control to allow a user to "cancel"
a process sounds good, there are arguments against it since it extends
the transaction time and thus the time records are locked;

Leaving records locked while the user is "thinking" is generally
asking for trouble.

Instead, I get all the user input upfront before calling the routines
that actually change the data. Which means that allowing a cancel is
simply a matter not doing the updates.

However, in a process where the user is strictly adding records, ie.
order entry, and assuming your processes are running under *CS instead
of *CHG, then using rollback to cancel the adds may not be so bad.

Charles

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.