Yorkshireman
3200 pts. | Aug 13 2009 7:40AM GMT
Thanks for that.
The only problem is that it’s a program, and that to get usab;e results would mean the old route of CPYSPLF and a parser program to read back the results. Even encapsulating all of that into a single RPG pgm, using User open of the SPLF, what you get is a clunky piece of work that lacks the elegance we look for in ILE. We already have and use a clunky solution (!)
To call this program you must have *SERVICE special authority too, so implementing it would mean having to adopt authority, and auditors will ask ‘why does this. . . blah blah - the way auditors do (for they lack both imagination and knowledge)
Adopt my own oft repeated advice and RTFM - some reserach is needed, but as ever, there’s no time left in this project for an unforseen issue.
Hafwhit
630 pts. | Aug 13 2009 2:28PM GMT
If you are only wanting to see if the file is in use you might be able to use the Open Stream File (QHFOPNSF) API and check for an error message code to see if it is in use. I have not used this API but have used similar ones to fine the status on other types of objects. I would assume the file is not in use if you did not get an error on the open. You may need to follow up with the Close Stream File (QHFCLOSF) API when finished.
You can search the V5R4 API’s at the API finder page






