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.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
  • 1.  File size using FTP

    Posted 02/13/06 04:54 PM

    Hi,

    I have a service which get a file using ftp package.
    I have a problem with some files which are opened and the get service is never ending.

    How can I identify the open files before trying to get them ?
    All this open files are having 0 bytes, is there a way to get the file length inside ftp?

    Thank you!

    regards,
    Constantin


    #webMethods
    #Integration-Server-and-ESB
    #webmethods-Protocol-and-Transport


  • 2.  RE: File size using FTP

    Posted 02/14/06 12:04 AM

    hi Constantin,

    There is probably a good answer for why your get is failing. That would be the better alternative then checking the size of the file.

    But if you are looking for a work-around, try using the ftp:quote service. It executes a given FTP command.

    You could use the SIZE remote-filename FTP command to identify the size of the file before processing.

    HTH,
    Cort


    #webmethods-Protocol-and-Transport
    #Integration-Server-and-ESB
    #webMethods


  • 3.  RE: File size using FTP

    Posted 02/14/06 03:54 PM

    hi Cort,

    It is working fine with size command. Thank you!

    regards,
    Constantin


    #webMethods
    #Integration-Server-and-ESB
    #webmethods-Protocol-and-Transport


  • 4.  RE: File size using FTP

    Posted 02/15/06 03:29 PM

    I agree with Cort that checking the filesize is probably masking another problem. You really should investigate why the get of the file is failing. My suspicion is that the file is locked by the process that is writing the file–thus you can see it via ls but you can’t get it.

    If this is the case, you might consider changing the interaction. The process that is writing the file should use a particular name pattern, such as *.tmp when writing. When the write is done, it renames the file to another pattern, such as *.dat. (Renames are atomic operations which either completely succeed or fail and no locks can exist on the file.) Your process then does ls and get for *.dat and will never try to retrieve a partial or locked file.


    #Integration-Server-and-ESB
    #webmethods-Protocol-and-Transport
    #webMethods


  • 5.  RE: File size using FTP

    Posted 12/02/11 05:57 AM

    pub.ftp:quote

    I have passed input as ---- dir twn_mot

    But it is giving, the following output

    ← 500 ‘DIR’: command not understood.

    Hi Reamon, please advice


    #Integration-Server-and-ESB
    #webMethods
    #webmethods-Protocol-and-Transport


  • 6.  RE: File size using FTP

    Posted 12/02/11 04:44 PM