× 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.



<Greg>
So the commitment control methodology is where I lack the knowledge.

Is there somewhere I can see a good (simple) example of how to best do this?

FWIW this is a rewrite of an order picking program... the rewrite involves multiple users picking the same (large) order, simultaneously. So I need to do this right. This is where I often "revert" to native RPG file access because of the complexity.
</Greg>

Commit is no magic and very easy with SQL:
- first of all you would need journaling for your tables (it's a good idea anyway to journal all tables!)
- your CRTSQLRPGI would specify COMMIT(*CHG) < this is the default anyway>
- give your PGMs a named ACTGRP and your SRVPGMs *CALLER
- so the controlling PGMs are commit master (saying COMMIT or ROLLBACK) and your SRRVPGMs commit slave
- for your insert statement you could use an isolation clause to pick up another locklevel (*ALL instead of *CHG from the create) => insert into .... with RS
- check SQLCODE afterwards. at success commit (releases all locks in transaction) else rollback (undoes transaction)
- Switching to SQL you would need this technique all overall!

It's a little bit diffrent from RLA, but more powerfull and stable.

D*B



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.