Hi,
I am trying to send files over to an ftp server on Mainframe using scripts that is provided in this link, but I can't get it to work.
The problem is the sendfile method concatinates the source file name to the MVS dataset name which causes the issue.
Here's my code (FTPConn is a connecation mgr for FTP):
Imports
SystemImports
System.DataImports
System.MathImports
Microsoft.SqlServer.Dts.RuntimePublicClass ScriptMain
PublicSub Main()
Dim mgr As ConnectionManager
mgr = Dts.Connections("FTPConn")
Dim conn As FtpClientConnection
conn = New FtpClientConnection(mgr.AcquireConnection(DBNull.Value))
Dim toFiles AsString
toFiles =
"ftpp.a.b.xxxxx.yyyyyy.int"
Dim fromFiles(0) AsString
fromFiles(0) =
"c:\test.txt"
Try
True, True)conn.Connect()
conn.SendFiles(fromFiles, toFiles,
Catch ex As Exception
Finally
conn.Close()
EndTry
Dts.TaskResult = Dts.Results.Success
EndSub
End
Class
Output:
SSIS package "Package.dtsx" starting.
Error: 0xC001602A at Package, Connection manager "FTPConn": An error occurred in the requested FTP operation. Detailed error description: 200 Representation type is Ascii NonPrint
200 Port request OK.
501 Invalid data set name "ftpp.a.b.xxxxx.yyyyyy.int/test.txt". Use MVS Dsname conventions.