RECORD LOCK and CDC

230 pts.
Tags:
AS/400
RPGLE
Record locks in USER EXIT program called by CDC. I have been thrown into figuring out why a user exit program cannot delete a record from a file because the record is locked since the employees who worked on it before no long work here.
This is happening from a CDC (CHANGE DATA CAPTURE) process where its calling user exit programs and updating files. A program gets stuck on a record lock trying to DELETE the record but it's held and this is the only thing this program does. It does a single chain to delete. The 2 other user exits that write, update, and delete have been modified to UNLOCK after a chain or read and that does not seem to do anything. The file in each of the 3 programs is a user open and each program does a force close and an immediate reopen when the program is first called and when the program is about to end I through an extra unlock on the file and a CLOSE to the file hoping the lock would break but to no avail.
If I could actually see the program locking it then hooray but the programs are triggered by CDC and not sure if CDC could actually have it locked but not sure of that.
What am I missing?


Software/Hardware used:
CDC version 6 soon going to 11
1

Answer Wiki

Thanks. We'll let you know when a new response is added.

If the employee(s) no longer work there, is it possible that the program will only allow the user profile that created it to delete it? If there profiles were removed, try adding them back with new passwords and see if you can then remove them. Otherwise try another method for removing the data. STRDFU or even write a SQL script to do it. These may have to be done under a profile like QSECOFR.

Discuss This Question: 4  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • ToddN2000
    If the employee(s) no longer work there, is it possible that the program will only allow the user profile that created it to delete it? If there profiles were removed, try adding them back with new passwords and see if you can then remove them. Otherwise try another method for removing the data. STRDFU or even write a SQL script to do it. These may have to be done under a profile like QSECOFR.
    134,445 pointsBadges:
    report
  • GregManzo
    If the problem is a record lock then it doesn't sound like an authority issue or anything related to the user profile. 
    Your comment "If I could actually see the program" makes me think you don't have access to the source code, in which case I can only suggest DFU or SQL to make the problem (record) go away or talk to your software vendor if it persists.
    If you can get at the src, check if the DELETE is using the same file/logical as the CHAIN that is locking the record - I've seen programs lock themselves out using 2 or more ODP's, or possibly 2 pgm's.
    2,960 pointsBadges:
    report
  • TheRealRaven
    If %error() is used, the PSDS will tell you which job has the record locked. The CHAIN or DELETE requires an (E) extender to signal %error for this.
    35,920 pointsBadges:
    report
  • TheRealRaven
    You might also look at the DSPRCDLCK command. Also, a couple APIs can return record-lock info.
    35,920 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: