From IBM's CHGPF command help...
" An exclusive-no-read lock is required, which means no one can be using the file for any purpose."
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of dale janus
Sent: Wednesday, April 10, 2013 2:22 PM
To: midrange-l@xxxxxxxxxxxx
Subject: CHGPF locks db2 and web page
We use an SQL command of select, & left outer join to read our open order file to display as html on a web page. this is our main(home) page that everyone opens and displays our open order page. The web site is internal only.
We had several people with the page open when I tried to change the headings of one field in the open order file from the green screen using CHGPF. A very simple change, just the headings. Not the field name, size, nothing like that. Just the column heading. I have done this lots of times before.
When CHGPF took a long time, I used another green screen using WRKOBJLCK and saw 5 users had the file locked. I don't remember if the job timed out or I cancelled the CHGPF job using the tried and true SHFT ESC 2.
This caused the file to become locked to SQL and cause an SQL 913 error (file locked) on the web page. When trying to access , which is the home page of our internal web site, the locked file caused the website to fail, and locked zend server. After the 30 second time out, pages that did not access the open order file were able to access the rest of the web site.
We had all users sign off and back on.
I kept checking WRKOBJLCK filename and there were no locks.
We restarted zendserver, myslq, all apache instances but the file remained locked when trying to view from the web page.
Finally, we re-ran the CHGPF. With no users locking the file, it was able to complete(took a fairly long time for a small file of 300 records) and then the web page displayed it correctly and there were no time outs.
I did not think it would be possible to thoroughly lock a file with CHGPF. I also expected the WRKOBJLCK command to show me any process using the file.
The internal web site is used by everyone for lots of production jobs, so it's failure sure caused a big stir around here. Even though they could access other parts, when they see the home page with an SQL error message, they don't even try.
Anyway, I am wondering if there was any other way I could tell what was locking the file other than WRKOBJLCK? Maybe something in ops navigator?
We had a few scary minutes there for a while.
---Dale
As an Amazon Associate we earn from qualifying purchases.