WRKOBJLCK problem – file locking I think

5 pts.
Tags:
Work with Object Locks
WRKOBJLCK
this is the problem. I run a long job containing updates of 2 files, OCLINE and OCHEAD. The program finishes fine but when I try to get into the file maint programs for these files, a blanks screen comes up. Then I sign off the terminal and sign on again and the maint program works fine. I think it must be a lock on the file(s). But how can I test which program is locking the file.

Answer Wiki

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

Hi,

Which kind of update are you doing? Writes? When you see a blank screen what do you mean?

If you do writes, some times the disk cache is not flushed to physical disk until it’s full or activation group is finished.

May be you program is finishing with RETURN without *INLR on?!

Regards,
Wilson

//////////////////
Is your program under commitment control – or are you using SQL with some level of commit????
This sounds as if it could be related to record locking. — if either is the case you want to issue
an RPG COMMIT or an SQL COMMIT command in your program. And if the files are opened using F spec’s make
sure that your program ends with *INLR *on and if it’s SQL with CLOSE CURSOR.

Phil

Discuss This Question: 3  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.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Technochic
    Can you define what "the program" is that you are using? Thanks.
    57,010 pointsBadges:
    report
  • wpoulin
    Mikea, Have you tried using the WRKOBJLCK command against the file you are attempting to maintain ? Also, if you do DSPJOB at the command line and take option 14 you can see what you have for open files. Maybe your program is not ending properly and releasing the files. Hope this helps, Bill Poulin
    2,480 pointsBadges:
    report
  • Gilly400
    Hi, It's also worth taking a look at your call stack. Regards, Martin Gilbert.
    23,730 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.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

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

Following