Discuss (FTP), (FTP on .NET CF) and (FTPS, SFTP and SCP).
no avatar
User

RichK

Posts

7

Joined

Sat Jan 15, 2011 12:55 am

edtFTPNet - Transfer to Mainframe (MVS)

by RichK » Tue Jan 31, 2012 1:57 am

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
no avatar
User

support2

Posts

3987

Joined

Tue May 18, 2004 8:30 am

Re: edtFTPNet - Transfer to Mainframe (MVS)

by support2 » Tue Jan 31, 2012 9:19 am

Trying putting single quotes around the filename.
no avatar
User

RichK

Posts

7

Joined

Sat Jan 15, 2011 12:55 am

by RichK » Wed Feb 01, 2012 5:10 am


Who is online

Users browsing this forum: No registered users and 1 guest

Powered by phpBB ® | phpBB3 Style by KomiDesign
cron