Check if the file is locked

115 pts.
Tags:
CL/400
CL/400 File Lock
Hi, How to check in CL that the file is locked. I want to do some operations after checking if the file is locked or not.
ASKED: May 19, 2009  1:09 PM
UPDATED: March 8, 2011  2:21 PM

Answer Wiki

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

Hi,

Just try to allocate the file in the CL if it fails, it’s already locked.

Regards,
Wilson

===========

Hi,

You can use the command ALCOBJ to allocate the file.

Regards,

Martin Gilbert.

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.

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
  • BeginnerAS400
    Martin Gilbert, I want to test for a dead lock scenario on a file. for this i used ALCOBJ command with EXCL lock status. But if i go a read operation on the file in COBOL400 pgm its not returning Sqlcode -913. But i want to have a dead lock on file i.e EXCL lock status. I would be thannkful if u email ur reply to mohankmv@gmail.com.
    10 pointsBadges:
    report
  • TomLiotta
    Was the ALCOBJ command run in the same job that called the SQL program? If so, there was no conflict. its not returning Sqlcode -913. If there were two separate jobs, then what happened? What was the SQLCODE? Finally, just to ensure that all possible details are covered, is it a COBOL/400 or an ILE COBOL program? Which compiler did you use? Tom
    125,585 pointsBadges:
    report
  • Qwerty1234
    Hi Martin, Can you give me some safe step for decreasing my ASP in PROD. im using i595 server and i need to decrese my ASP. I already deleted the audit journal and the JOBLOG but still high ASP. Thanks for your feedback. Philip/AS400-Phils
    10 pointsBadges:
    report
  • HMSSL2K
    Check this Redpaper out
    3,175 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