IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Picking up partial file in Unix

    Posted Thu December 11, 2003 10:33 PM

    We have an adapter that processes hundreds of files that get copied to a directory over a couple minute period daily. On occassion we it appears the adapter only reads part of a file. The files reside on a unix box. Does anyone know if the unix os puts a lock on a file while it is writing to it. It almost appears the file is being read before the file copy is complete. This is very sporatic and happens only about once every couple of weeks.

    Thanks

    Ed.


    #webMethods
    #Integration-Server-and-ESB


  • 2.  RE: Picking up partial file in Unix

    Posted Wed March 17, 2004 10:01 PM

    I know this is an old post, but just in case someone else has the same problem. Our experience is that Unix does not lock a file while it is writing to that file, so we were picking up partial files all the time. We fixed this by implementing a new procedure on our Unix system. The policy is that any file is always written to a working or temporary directory until the file is complete. Then we use the Unix “mv” command to rename the file from the working directory to the target directory that the Adapter is polling. Since “mv” just moves the file pointer, the file is always complete. Once we implemented this, we did not have any more problems with partial files.


    #Integration-Server-and-ESB
    #webMethods


  • 3.  RE: Picking up partial file in Unix

    Posted Wed May 05, 2004 04:52 PM

    Did you try to set the File Age in the Port configuration? I believe that the poller will check to see that the file is a certain age before it is processed.


    #webMethods
    #Integration-Server-and-ESB


  • 4.  RE: Picking up partial file in Unix

    Posted Wed May 05, 2004 04:53 PM

    Or maybe you’re not polling.


    #webMethods
    #Integration-Server-and-ESB


  • 5.  RE: Picking up partial file in Unix

    Posted Wed May 05, 2004 05:47 PM

    David is correct in his assessment of the Unix situation with regards to file locking. We recently experienced the exact same behaviour on a project.

    As David also states, the solution we implemented was identical to his. Write the file somewhere else (to a working directory), then move the file to the poll directory.

    This problem does not occur when polling to a Windows system.


    #webMethods
    #Integration-Server-and-ESB


  • 6.  RE: Picking up partial file in Unix

    Posted Wed May 12, 2004 10:32 AM

    Hello all

    I am experiencing the same problem but on an AS400 IFS.
    It seems that the files aren’t locked while being written there either.

    Neal, what is that File Age in the port you are referring to? Or is it Unix only?


    #webMethods
    #Integration-Server-and-ESB