Sreeraj
20 pts. | Aug 28 2009 8:32AM GMT
Hi Roy,
Thanks for ur reply. Actually i had already done WRKOBJLCk on it and found out that the file was locked by my profile itself. But I was not using that file at that time , not running any jobs also. Still it shows that the file is locked. this happens right after running a particular program in my profile. But program successfully came out after running . but files are not getting released.
Whatis23
4040 pts. | Aug 28 2009 4:54PM GMT
If the file was opened by the OPNDBF or OPNQRYF commands, the Close File (CLOF) command will close a database file opened with those commands. Try this to release the lock.
TomLiotta
7355 pts. | Oct 11 2009 11:16AM GMT
Try a basic RCLRSC to force files to close.
Note that this should only be done if you’re sure the file doesn’t need to be open. There might be an activation group that expects the file to remain open. There might have been a trigger program that expects the file to stay open. There might be an exit program registered against any number of system exit points that expects the file to stay open.
There shouldn’t be functions that leave files open when you need to establish locks on the files in other functions. Either the file is left open by mistake or you shouldn’t be locking it. Either way, something needs to be fixed.
Tom






