|
One solution might be to create the file under a temporary name, and use Qp0lRenameUnlink() once you are done with it. This way, as soon as it appears under it's correct name, it's all ready for the PC to pull. Another possibility would be to call fcntl() with F_SETLK to use the operating system's locking semantics to lock the file. You can find details in the UNIX-type APIs manual, here: http://publib.boulder.ibm.com/pubs/html/as400/v4r5/ic2924/info/apis/fcntl.htm#HDRFCNLOC On Thu, 1 Nov 2001, Giri Gopal wrote: > Hello: > > > I am using RPGIV to write to IFS file system. Another PC based application > is has a mapped drive to this folder. This application is monitoring for a > file every 2 minutes. The problem is I open the IFS file for ouput in my RPG > program, and while I am writing to this IFS file, the other system sees the > file and grabs it even before I am done writing. More importantly the other > application deletes the file once it has copied this file. They use FTP to > get this file. > > > Question is: How can I open the file and have a lock until I am done > writing? > > > Thanks for your help in advance. > Giri
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.