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

RE: FTP Error 10



I know.  This doesn't make any sense.  Here's the code used.  Your thoughts?

// Connect to FTP server.
Sess = FTP_conn(RemoteHost : RmtUser : RmtPassword);
if Sess < 0; // connect error
  ReturnMsg = FTPError(Sess : ReturnCode);
  exsr EndPgm;
endif;

// Turn on logging.
if FTP_logging(Sess : *ON) < 0;
  ReturnMsg = FTPError(Sess : ReturnCode);
  exsr EndPgm;
endif;

// Set working directory on remote server.
if RmtDirectory <> *blanks;
  if FTP_chdir(Sess : RmtDirectory) < 0;
    ReturnMsg = FTPError(Sess : ReturnCode);
    exsr EndPgm;
  endif;
endif;

// Set binary mode.
if FTP_binaryMode(Sess : *ON) < 0;
  ReturnMsg = FTPError(Sess : ReturnCode);
  exsr EndPgm;
endif;

// Send file.
if FTP_put(Sess : RmtFileName : LclFileName) < 0;
  ReturnMsg = FTPError(Sess : ReturnCode);
  exsr EndPgm;
endif;

// End program.
  if Sess >= 0;
    FTP_quit(Sess);
  endif;
  *inlr = *on;
  return;
/end-free

p FTPError        b

d FTPError        pi            60a
d  Sess                         10i 0 const
d  ErrorCode                     7a
d ErrorMsg        s             60a
d ErrorNum        s             10i 0
d ErrorNumZ       s              4s 0

 /free
   ErrorMsg = FTP_errorMsg(Sess : ErrorNum);
   ErrorNumZ = ErrorNum;
   ErrorCode = 'FTP' + %editc(ErrorNumZ:'X');
   return ErrorMsg;
 /end-free

p FTPError        e


Barbara Straus
IT Software Engineer
513-701-1353


-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Scott Klement
Sent: Tuesday, October 23, 2012 11:18 PM
To: HTTPAPI and FTPAPI Projects
Subject: Re: FTP Error 10

Hi Barb,

On 10/23/2012 7:19 AM, Straus, Barb wrote:
> 0: > STOR
>
> OnlineBillPay_FileTransfer~mam_ref_543471.121023.pgp;application:cinta
> sFTP
> 0: 150 Binary mode  data connection for
>    OnlineBillPay_FileTransfer~mam_ref_543471.121023.pgp;application:cintasFTP (10.20.117.1,21318).
> 0: > QUIT
>    55000 - SNDUSRMSG
> Message . . . . : FTP ERROR FTP0010 - A connection with a remote
> socket was reset by that socket.. NOTIFY TECHNICAL STAFF. (R P)

Hmmm... this is strange...   I don't understand why you're sending a
QUIT, above, when you haven't yet received the response to the STOR
command??   FTPAPI should sit on the 'STOR' command until it receives a
response.

Which API are you calling when you get the return value of 10?  Is the
10 occuring during the FTP_put() or the FTP_quit()?   I can't tell from
the log you provided, since the I don't see the error until, apparently you've exited to a CL program doing SNDUSRMSG.


> Also, I found out that the server we send the message to encrypts the file before sending back the transfer complete message and it takes over 10 minutes to encrypt the file.  I've asked if the message could be sent before the encryption.  Waiting for a reply on this.

Hmmm... possibly you need to send a SITE command or something similar to
increase the server-side timeout?


-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------

This e-mail transmission contains information that is intended to be confidential and privileged. If you receive this e-mail and you are not a named addressee you are hereby notified that you are not authorized to read, print, retain, copy or disseminate this communication without the consent of the sender and that doing so is prohibited and may be unlawful. Please reply to the message immediately by informing the sender that the message was misdirected. After replying, please delete and otherwise erase it and any attachments from your computer system. Your assistance in correcting this error is appreciated.


-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------