The following code gets the file to the Mainframe but in the 80 byte LREC format, I need it to land in 11 bytes (Site command?) can anyone help? I have used third party products but perfer to stay in VB or use WS_FTP if VB can not do it. This is a Console application.
Thank you, Alan (Lunch for the solution)
Thank you, Alan (Lunch for the solution)
VB.NET:
Dim b() As Byte
Dim ftp As System.Net.FtpWebRequest = _
CType(FtpWebRequest.Create(URI), FtpWebRequest)
ftp.Credentials = New System.Net.NetworkCredential(logonID, password)
ftp.UseBinary = False
ftp.Method = System.Net.WebRequestMethods.Ftp.UploadFile
ftp.UsePassive() = True
Dim Stream As StreamReader = New StreamReader(vendorFileName1, _
System.Text.Encoding.ASCII, False)
b = Encoding.Default.GetBytes(Stream.ReadToEnd())
ftp.ContentLength = b.Length
Dim requestStream As Stream = ftp.GetRequestStream()
Last edited by a moderator: