[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Need Help with FTP API - Getting error with SIZE



   I'm trying to do a Get Command, the file that I need is on a Windows
   FTP server.

   Now that I'm trying to GET the PDF file that I placed on the server it
   fails.
   I've tracked the issue down to the point that a send is done requesting
   the SIZE of the file.
    *Change to Binary Mode
   c                   callp     ftp_binaryMode(sess: *on)
    *Change Name Format to 1
   c                   callp     ftp_NamFmt(sess: 1)
    * Get the Requested file
   c                   if        ftp_get(sess: SendFrom:SendTo)<0

   SendFrom= /00000010000007009747180009010910909.pdf
   SendTo =   /pdf/00000010000007009747180009010910909.pdf

   Looks like all goes well until the SIZE is requested

    * get total number of bytes to receive
   c                   eval      wkTotBytes = FTP_size(peSocket :
   c                                                   peRemote )


   * send size command:
   c                   if        SendLine(wkSocket: 'SIZE ' + peFile)<0
   c                   return    -1
   c                   endif

    * 213 <byte size>
   c                   eval      wwReply = Reply(peSession: wwMsg)

   ***** Connection Times out while waiting on response ****

   ***** What was sent in SendLine ***** = SIZE
   /00000010000007009747180009010910909.pdf


   NOTES:
   1) I'm currently using this same API to do a PUT from the AS400 to this
   Windows FTP server w/o any issues.
   2) I used FTP on the AS400 and was able to transfer this file from the
   Windows FTP server to the IFS on the AS400.
   3) I issue the BIN and NA 1 commands before I request the GET. They
   apear to work.

   Thanks in advance for any help you can supply.
   Dan
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------