Frank,
Have you looked into having Cache ftp the file for you? Below is some
code snippets from a class I wrote to
handle sending file via ftp:
Set ftp=##class(%Net.FtpSession).%New()
Set stat=ftp.Connect(..server,..username,..passwd)
If ..trsfrtype="B" {
Set stat=ftp.Binary()
Set Msg=" >Transfer method set to Binary"
} Else {
Set stat=ftp.Ascii()
Set Msg=" >Transfer method set to Ascii"
}
if you need to change directories on the receiving system:
Set stat=ftp.SetDirectory(..serverdir)
When sending the file:
If ..filetype="B" {
Set sf=##class(%FileBinaryStream).%New()
} Else {
Set sf=##class(%FileCharacterStream).%New()
}
Set sf.Filename=FILE
Set SendFile=..sendasname
set stat=ftp.Store(SendFile,sf)
If you need to rename the file on the receiving server:
Set stat=ftp.Rename(SendFile,NewName)
End your ftp session"
ftp.Logout()
hth,
Donnie