Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
24.4k views
in .NET FTP by (320 points)
Hi,

I am using the below code to send files to mainframe, but getting this error, appreciate if some one can look in to it.

Here is the code i am using to upload file in .net

Dim ftpconnection1 As New EnterpriseDT.Net.Ftp.FTPConnection

ftpconnection1.ServerAddress = "myftpsite.com"
ftpconnection1.UserName = "XXXXX"
ftpconnection1.Password = "XXXXX"
ftpconnection1.Connect()
ftpconnection1.TransferType = Ftp.FTPTransferType.BINARY
ftpconnection1.InvokeSiteCommand("lrecl", "62")
ftpconnection1.InvokeSiteCommand("blksize", "29452")
ftpconnection1.InvokeSiteCommand("recfm", "fb")
ftpconnection1.UploadFile("C:\DBQ\T20KM3_FOLDED1OZ_10.AFP", "STMT.FTP.LAW.T20KM3")
ftpconnection1.Close()

Here is the error i am getting.

Additional information: SVC99 Return code=4 S99INFO=0 S99ERROR=38668 HEX=970C S99ERSN code X'000042CE'). Unable to create data set ASFTPLAW.STMT.FTP.LAW.T20KM3 for STOR command.

Appreciate your help.

Thanks
John

14 Answers

0 votes
by (161k points)
Our code doesn't do this - it must be occurring on the server. Is there any SITE command that will prevent this behaviour?
0 votes
by (180 points)
When you upload a file to a mainframe, you must surround your file name with single quotes. If you don't the mainframe will add your logon ID to the beginning of the file name.

Replace
ftpconnection1.UploadFile("C:\DBQ\T20KM3_FOLDED1OZ_10.AFP", "STMT.FTP.LAW.T20KM3")
with
ftpconnection1.UploadFile("C:\DBQ\T20KM3_FOLDED1OZ_10.AFP", "'STMT.FTP.LAW.T20KM3'")
0 votes
by (161k points)
Thanks for the tip - that's very handy to know.
0 votes
by (340 points)
I have this problem but with JAVA Code, i post it on this topic for JAVA i hope u can help me

Categories

...