× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



It all depends on your design. If I have multiple files that need to be
updated for a transaction, they are all handled within the UpdateXxxx()
routine. Let's say I have an AddPickticketLine() procedure that adds a
record to the pickticket detail file. If my business rules require that I
increment the quantities in the Pickticket Header file, as well as reduce
the unallocated quantity in the Order Header, and reduce allocatable
inventory quantities in the inventory files, all of those intricacies
should be within the AddPickticketLine() procedure. With them all in that
one procedure, the procedure is quite capable of dealing with the commit.

I generally always create a commit and rollback procedure in the service
program in case I hit a situation that is so nasty that it can't be
encasulated (I can think of only one off the top of my head in the last
several years).

Brian May
Project Lead
Management Information Systems
Garan, Incorporated
Starkville, Mississippi



Joep Beckeringh <joep.beckeringh@xxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
03/01/2010 02:41 PM
Please respond to
RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>


To
RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>
cc

Subject
Re: File Read in Subprocedure WAS(Re: More on RPG style)






Op 01-03-10 17:34, BMay@xxxxxxxxx schreef:
Let's say your original application did not use commitment control
(don't
know why anyone would do that, but that's another topic). Your boss
tells
you to implement commitment control on the application. Guess how many
places you need to deal with it? One.

That is a very optimistic view; it assumes that every database update is
committed immediately. As soon as you have a transaction that consists
of more than one update (isn't that what commitment control is for?) you
cannot do the commit from within the subprocedure. Ergo, the caller of
the subprocedures has to do the commit.

Joep Beckeringh


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.