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



@Luis,

But the (n) extender locks the row not the file.
"If you are reading from an update disk file, you can specify an N
operation
extender to indicate that no lock should be placed on the record when it
is read
(e.g. CHAIN (N)). "
So in my case, since the record was not found by the Chain no lock (having
or not having the N extender) would be put on the row. So it would not
stop someone else from being able to write the record.

This program is called as a stored procedure by .NET via the web so a) is
always possible.
I don't believe that b) makes a difference. Correct me if I'm wrong...
And c) I think this is needed.

I have always coded a Write preceded by a Chain and if %Found() test and
never experienced a problem (that I know of).
Should I start checking the Write as part of my standard coding?

Thanks,

Robert Rogerson

On 2011-11-15 11:37 AM, Luis Rodriguez wrote:

Robert,

As the (n) operation extender in CHAIN means, effectively, NO LOCK, I
suppose that yes, there is the chance that another application and/or user
has already added a record with the same key to your table.

You need to either to be sure that a) no one else is adding records to the
same file, b) omit the (n) extender or c) conditioning your write opcode.

HTH,

Luis Rodriguez
IBM Certified Systems Expert -- eServer i5 iSeries

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.