[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ftp_put
Please try running your FTP session in passive mode. The
FTP_passiveMode() API is used to put the session into passive mode.
Let us know if that helps.
On 2/14/2010 1:49 PM, Franco Montefusco wrote:
> Hello Scott,
> I'm try to send a file from AS to windows server ftp and on ftp_put
> procedure the program is like in loop.
> Can You help me?
>
> CPY /COPY LIBFTP/QRPGLESRC,FTPAPI_H €
>
> D Msg S 52A
> D sess S 10I 0
>
> D codeascii S 10I 0 inz(819)
> D codeebcdic S 10I 0 inz(280)
>
> ‚ * connect to FTP server. If an error occurs,
> ‚ * display an error message and exit.
> c eval sess = ftp_conn('89.96.73.51':
> c 'impdoc':
> c 'password':
> c 2170)
> B01 c if sess< 0
> c eval Msg = ftp_errorMsg(0)
> c dsply Msg
> c eval *inlr = *on
> c return
> E01 c endif
> *-----------------------------------------------------------------------
> c if FTP_codePage(sess :codeascii
> c :codeebcdic)<> 0
> c eval Msg = ftp_error
> c endif
> c 'Code pag ok' dsply
> *-----------------------------------------------------------------------
> c callp ftp_binaryMode(sess: *off)
> c 'CALLP ok' dsply
> *-----------------------------------------------------------------------
>
> ‚ * Place the TESTPUT source member onto the FTP server
> *-----------------------------------------------------------------------
> B01 c if ftp_put(sess: 'prova6.txt'
> c :'/qsys.lib/gv6_datdp.lib/x1ordtr.file/'+
> c 'x1ordtr.mbr' )< 0
> c eval Msg = ftp_errorMsg(sess)
> c dsply Msg
> E01 c endif
>
> ... then close
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------