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)
Are you able to successfully transfer using another client?

These kind of transfers can be a bit tricky, working out the correct SITE commands to use.
0 votes
by (320 points)
No, We use only one client.

The SITE command works fine at DOS prompt when i ftp the file.
0 votes
by (161k points)
Have you ever successfully transferred the file to this mainframe?
0 votes
by (320 points)
yes i did using the same script in a DOS batch file.
0 votes
by (161k points)
Can you post the successful script here? (obscure the host name etc)
0 votes
by (320 points)
Thankyou for the reply.

Here is the script of the batch file i am using to upload the files.

XXXXXXXFTPSITE
PSPFTPLAW
PASSWORD
BINARY
quote SITE recfm=vb
quote SITE lrecl=43553
quote SITE blksize=21474
quote SITE pri=500
quote SITE sec=500
put c:\01180120@07_PDS_CDI_J027CF_FLAT_75.AFP 'STMT.FTP.LAW.J027CF'
quit
0 votes
by (161k points)
use

InvokeSiteCommand("recfm=vb") ;
InvokeSiteCommand("lrecl=43553") ;

etc
0 votes
by (320 points)
Bruce,

I tried the belwo syntax for InvokeSiteCommand.

InvokeSiteCommand("recfm=vb") ;
InvokeSiteCommand("lrecl=43553") ;

But the program still give me the same error.

An unhandled exception of type 'EnterpriseDT.Net.Ftp.FTPException' occurred in edtftpnetpro.dll

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

John
0 votes
by (161k points)
Silly question I know but I assume you've used that syntax for all the SITE commands.

Can you post a log file?
0 votes
by (320 points)
i Used the syntax for all the SITE Commands.

I see the problem is the EnterpriseDT.Net.Ftp.FTPConnection is appending the Userid to the desination file name.

ASFTPLAW.STMT.FTP.LAW.T20KM3.

The destination file name should be only STMT.FTP.LAW.T20KM3.

Is there any command i can use to stop it, normally When using native TSO on a z/OS system, the user name is prefixed in this manner. Under TSO, just putting the name in quotes stops this behavior.

please let me know.

Categories

...