|
I'm stumped...
I have an SQLRPGLE program that is trying to update a QTEMP table
but it's producing an error saying that a record in QTEMP/RCTDTL is
in use. The problem is that it says that it's coming from an
interactive job from another user. I know that QTEMP is unique to
each user, so I am certain that the user doesn't have the record
locked in QTEMP/RCTDTL. This user is responsible for maintaining
IMSPITM so it's likely that they have a record locked in this file
because they have it up in the maintenance program. I have verified
that they are in the maintenance program.
UPDATE QTEMP/RCTDTL
SET (ITMTYP, ITMMFR, ITMITG, ITMSFX,
ITMPUM, ITMIUM, ITMRUM, ITMPCF, ITMICF) =
(SELECT ITMTYP, ITMMFR, ITMITG, ITMSFX,
ITMPUM, ITMIUM, ITMRUM, ITMPCF, ITMICF
FROM IMSPITM
WHERE ECDCONO = ITMCONO
AND ECDCPY = ITMCPY
AND ECDITM = ITMITM)
How can I tell SQL not to gain update access to IMSPITM?
In the job log I do have a message saying "Subselects processed as
join query". I'd imagine that this is what is causing the update
access to IMSPITM.
Here's the actual error message in the job log.
Record 46927 in use by job 251535/USER/JOB
Cause . . . . . : You cannot get record number 46927 record format
FORMAT0001 member number 2 in member RCTDTL file RCTDTL in
library QTEMP because record number 46927 is being used by job
251535/USER/JOB. The error code is 2. If the error code is 1,
then this error occurred when record number 46927 was locked by
job 251535/USER/JOB which was waiting on a lock held by this
job. If the error code is 2, then job 251535/USER/JOB was not
waiting on a lock held by this job.
I also verify that the record number in the error message happens to
be the record that the user has up in the maintenance program.
Any ideas?
As an Amazon Associate we earn from qualifying purchases.
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.