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



Hi,

I'm having trouble using commitment level (*CS) outside the default
activation group. First an explenation why I want to use commitment control
with lock level (*CS) instead of (*CHG).

Our programs (written in ILE-RPG) all utilize commitment control with lock
level *CHG and commitment definition scope *JOB. This ensures that
everything is handled like an transaction, and that written or updated
record's can't be changed again before they are committed. What lock level
*CHG doesn't prevent is dirty reads. I can read records that are added or
changed but not committed yet.

To prevent this I want to change the lock level from *CHG to *CS. I assumed
that nothing else has to be changed, but I did some tests and concluded 2
things:
* I have to use error extender (e) on SETLL or SETGT to prevent problems
when I position to record that is not committed, but changed in another job.
* I have to change the file specification of every input file. Currently
these file are not under commitment control, because they didn't change. It
seems that it is necessary to add the keyword "Commit" to make sure lock
level *CS works correctly.

Above statements are only true when programs are compiled with DFTACTGRP =
*NO. When (test)programs are compiled with default activation group = *yes
then the setll/setgt position works fine(Read: don't generate an error when
positioning occurs before(or on) a record that is not commited in another
job).

The questions
==========
If would like to know if above statements are true when using commitment
control *CS:
1) Using error extender in SETLL/SETGT is required to prevent dump of
program
2) Use keyword 'COMMIT' for input files only

We are using OS/400 V5R3M0, and our test applications use named activation
group QILE.

Thanks in advance,

Erik Makaay







 ----------------------------------------------------------------------




Music from EMI 

This e-mail including any attachments is confidential and may be legally 
privileged. If you have received it in error please advise the sender 
immediately by return email and then delete it from your system. The 
unauthorised use, distribution, copying or alteration of this email is strictly 
forbidden. If you need assistance please contact us on +44 20 7795 7000. 

This email is from a unit or subsidiary of EMI Group plc. 

Registered Office: 27 Wrights Lane, London W8 5SW 

Registered in England No 229231.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.