I'm getting a CPF4128 intermittently ... and *NOT* in the program that's doing the CPYF.

The best I can tell is that the CPYF is locking the object in some way and then other applications are getting errors when trying to access the file in question.

If, however, the file is already open in another application ... no error occurs when I copy records using CPYF.


On 4/26/2012 3:07 PM, Paul Therrien wrote:
Can you show us the error message(s) you are getting?

Paul Therrien

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of David Gibbs
Sent: Thursday, April 26, 2012 2:10 PM
To: Midrange Systems Technical Discussion
Subject: CPYF lock?


I'm working on a problem where we are having problems when using CPYF to add records to a file.

I was reviewing the help text for the CPYF command noticed something ...

During the time a CPYF request is run, the file specified for
the To file (TOFILE) parameter may be locked (similar to an
*EXCL lock with no timeout) so that no access is possible.

This has me somewhat confused ... what do they mean "may be locked" and "similar to an *EXCL lock"?

I tried doing a CPYF to a a file that was allocated with *SHRUPD, but the copy worked fine. The only way I was able to get CPYF to have a problem copying records was if allocated the object with *EXCL myself.

So the questions are ...

a) What determines if the target file is locked or not.
b) What kind of lock is put on the target file (if it's not exactly a *EXCL lock).
c) Is there a way to reproduce the lock so I can diagnose the problem?



As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 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.