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



Koester, Michael wrote:
A co-worker is trying to troubleshoot a record-lock
issue that he thinks may be coming from an imbedded
free-form SQL "Select Into" statement. This is
plain-vanilla stuff, with no SQL cursor involved.
There appears to be a lock held on the LF he has
in the From clause.

We're running V4R5.

There mainline begins with...
exec SQL
SET OPTION closqlcsr = *endmod,
commit = *none,
datfmt = *iso ;

The following SQL select occurs in an inline subprocedure.

exec sql
select sum(epfnwp)
into :tamt
from achonll1
where epfbex = :pi_mex
and epfbln = :pi_mln
and epfbrs = :pi_mrs
with nc ;

Is there something about SQL over logical views (DDS-defined)
that is causing this to lock, or is there something else we
need to know?


A lock on a *FILE is not the same as a record lock. Both types of locks are noted separately, as being a problem. Best to clarify which it is that is of concern, or if both; if a record lock, then what record(s) and what type of lock is held. Refer to output from both of:

WRKOBJLCK TheLib/TheFile *FILE MBR(*ALL)
DSPRCDLCK TheLib/TheFile

Regards, Chuck

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.