|
On Jan 13, 2021, at 7:04 PM, Scott Klement <rpg400-l@xxxxxxxxxxxxxxxx> wrote:
Jay,
When you say "an ifs file", I assume you mean a stream file, right?
Normally stream files aren't "locked" by someone else using them. You can clear them or even delete them while someone else has them open. This begs the question: How is it locked?
Was this locked by using one of the O_SHARE_xxx flags on the open() API? If so, the only way to release that lock is to close the open file. This would normally be done by calling the close() API, but if for some reason that isn't possible (such as if the program crashed before it got to the close statement, and its not possible to resume where it left off) you could close it by ending the activation group. Or, if somehow this was done in the default activation group (I hope not... but, it's possible) then you could end the job.
Or, was it locked by something like the CHKOUT command? If so, the only way to release that is to run CHKIN.
Or... some other way? We'll need to know what that is.
-SK
On 1/13/2021 5:45 PM, Jay Vaughn wrote:--
So I’m in my rpg program and I’m needing to clear an ifs file but it’s currently locked to my own job. Is there an api I can call to unlock it.
Rlsifslck, chkin, and closing the file are all out of the question. And as much as I would like to use a slick little sql statement (if possible) I’m not interested in that either.
Tia
Jay
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.
Help support midrange.com by shopping at amazon.com with our affiliate link: https://amazon.midrange.com
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.