RCLRSC seems like a bit of a nuclear option.
You may want to try using "cat" to copy the file contents somewhere. "cat" likely will ignore the lock. However, you *may not* get all the content if the file has not been flushed.
Why don't you just code the RPG to close the debug file before exit. That's the cleanest (proper) fix - ensures the file is flushed and released.
Roger Harman
COMMON Certified Application Developer - ILE RPG on IBM i on Power
-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of James H. H. Lampert via MIDRANGE-L
Sent: Friday, June 16, 2023 2:53 PM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Cc: James H. H. Lampert <jamesl@xxxxxxxxxxxxxxxxx>
Subject: Re: CPY command fails with CPFA09E
On 6/16/23 11:53 AM, Roger Harman wrote:
I used to put in a 4 or 5 second delay on some tasks like this. I
don't think there is a "wait" parameter for IFS objects.
The short delay solved the problem. My unscientific conclusion was
that the machine is so fast that the lock release couldn't complete
before the CPY makes its attempt.
In my case, the negligible delay had no negative impact on the
process and solved the problem.
Hmm. Assuming that I'm right about the httpapi service program holding a
lock on the http_debug file, would it help if the master CL did a
RCLRSC, followed by Mr. Harman's 5-second delay?
--
JHHL
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit:
https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at
https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.
As an Amazon Associate we earn from qualifying purchases.