Have had a similar problem. Likely the issue is your FTP server needs to increase its timeout settings.
You could try extending the FTP adapter and overriding the delete method as follows:
{
Set tSC=..setFilePath(pFileDir,.tOldDir) If $$$ISERR(tSC) { $$$LOGSTATUS(tSC) Quit 0 }
Set tOK=$S(..%isSFTP:..FTP.DeleteSSH(pFilename),1:..FTP.Delete(pFilename))
if 'tOK
{
if ..Connected set tSC=..Disconnect(1)
Set tSC=..Connect(..ConnectTimeout,1)
Set tOK=$S(..%isSFTP:..FTP.DeleteSSH(pFilename),1:..FTP.Delete(pFilename))
}
Do:'tOK ..disconnectOnNetErr(,1)
If ..Connected { Set tSC=..restoreFilePath(tOldDir) If $$$ISERR(tSC) $$$LOGSTATUS(tSC) Quit 0 }
Quit tOK
}
If tOK returns an error, you failed to delete. this change will disconnect from the server, reconnect and delete again. As the most likely issue is you are not connected this will work around your ftp server's timeout.
The other option is to update your FTP server to have a larger timeout window.
It looks like they are sending:
" PID||5520005629|0102163||JINDAL^ASHOKI KR^^||19490901|M"
and not:
"PID||5520005629|0102163||JINDAL^ASHOKI KR^^||19490901|M"
note the leading white space in the first entry
Have had a similar problem. Likely the issue is your FTP server needs to increase its timeout settings.
You could try extending the FTP adapter and overriding the delete method as follows:
Method delete(pFilename As %String, pFileDir As %String) As %Boolean
{
Set tSC=..setFilePath(pFileDir,.tOldDir) If $$$ISERR(tSC) { $$$LOGSTATUS(tSC) Quit 0 }
Set tOK=$S(..%isSFTP:..FTP.DeleteSSH(pFilename),1:..FTP.Delete(pFilename))
if 'tOK
{
if ..Connected set tSC=..Disconnect(1)
Set tSC=..Connect(..ConnectTimeout,1)
Set tOK=$S(..%isSFTP:..FTP.DeleteSSH(pFilename),1:..FTP.Delete(pFilename))
}
Do:'tOK ..disconnectOnNetErr(,1)
If ..Connected { Set tSC=..restoreFilePath(tOldDir) If $$$ISERR(tSC) $$$LOGSTATUS(tSC) Quit 0 }
Quit tOK
}
If tOK returns an error, you failed to delete. this change will disconnect from the server, reconnect and delete again. As the most likely issue is you are not connected this will work around your ftp server's timeout.
The other option is to update your FTP server to have a larger timeout window.