Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
3.5k views
in .NET FTP by (320 points)
I am using the VB .Net code below to perform a file transfer from Windows to a Mainframe running MVS.

The transfer performs as expected with one exception:

the file I am trying to output is: TC1.FAS.PPOSPAY

however, it is always output as login.TC1.FAS.PPOSPAY - login being the FTP login I am using to connect to the mainframe FTP service.

Not being very familiar with TSO/ISPF, I would like to know why, and to know how I can force the file to be output without the leading login qualifier



Private Function TransferToMainFrame(ByVal fromloc As String) As Integer

LogMsg("Transferring File: " & fromloc)

Dim conn As New FTPConnection()
Dim target As String = AppSettings("MVS_Target_File").ToString()

Try
conn.ServerAddress = AppSettings("MVS_Host_Name").ToString()
conn.UserName = AppSettings("FTP_Login").ToString()
conn.Password = AppSettings("FTP_Pwd").ToString()
conn.Connect()
conn.TransferType = FTPTransferType.ASCII
conn.UploadFile(fromloc, target, False)
conn.Close()
conn.Dispose()
Catch ex As Exception
conn.Close()
conn.Dispose()
LogMsg(ex.Message)
Return 99
End Try

Return 0

End Function

2 Answers

0 votes
by (162k points)
Trying putting single quotes around the filename.
0 votes
by (320 points)
Works great. Thank you for your timely help.

Categories

...