Search : in
By :

File transfer from client to ftp MVS server.

Last answer on Nov 25, 2008 7:50:25 pm GMT hvnDMV, on Nov 25, 2008 6:00:44 pm GMT 
 Report this message to moderators

Hello,
I am performing a data transfer from a local file to host (MVS server).
Client language: VB.NET. I created object "socket" from class System.Net.Sockets.socket to connect to host and send command to host. My FTP server is MVS server. My coding performed following jobs successfully.
1) Connecting to host, 2) Sending commands PASV, TYPE and SITE to host.
My Question: How to create a remote file in host?
I cannot to create a remote file in host via sending command STOR to host by methods socket.Send() and socket.Receive(). No response was returned from host. My remote file path name is <userID>.<xxx>.<Upload>.<Test>.<RemoteFileNam>.
I appreciate all helps and suggestions to solve this problem.
Howard N

Configuration: Windows XP
Internet Explorer 7.0

Best answers for « File transfer from client to ftp MVS server. » in :
FTP protocol (File Transfer Protocol) Show Introduction to FTP protocol FTP protocol (File Transfer Protocol) is, as its name indicates a protocol for transferring files. The implementation of FTP dates from 1971 when a file transfer system (described in RFC141) between MIT machines...
File transfer via SSH ShowSSH - Secure SHell SSH allows the use of pipelines controls, and use inputs / outputs pipes as any other commands , on the basis that redirection is done to or from the remote machine. This may be used to transfer files: ssh server...
Scan files transferred in WLM with Avast ShowScan files transferred in WLM with Avast Windows Live Messenger allows you to transfer and receive files easily to your contacts. But how would you determine that the file you are about to download is safe and does not contain a virus? To...
Uploading Large Files ShowUploading Large Files You have surely encountered various difficulties for sending files through e-mail due file limitation. You have found the elucidation to your trouble. There are several means to transfer files and data from one...
Download Medieval Bluetooth OBEX File Transfer ShowMedieval Bluetooth OBEX File Transfer is an administrator for file transfer between your PC and your telephone, PDA, Palm or Notebook and through your Bluetooth connection.The management of files is done by drag and drop operations and you can view...
Using FTP commands ShowThe FTP protocol FTP (File Transfer Protocol) is a protocol — meaning a standard language that lets two machines communicate — used so that computers of different types (or with different operating systems) can transfer files over a...
FTP commands ShowThe FTP protocol FTP (File Transfer Protocol) is a protocol — meaning a standard language that lets two machines communicate — used so that computers of different types (or with different operating systems) can transfer files over a...
UNIX Commands ShowTable of the main UNIX commands Unix Commands Description Options ls lists the content of a directory -a Displays all files, including hidden files -I Displays a...

1

carmi, on Nov 25, 2008 6:13:09 pm GMT

Do you have any access to the MVS machine? in that case you can 'get' the file from the MVS without any written code/script in the PC.

Carmi Sternberg

Reply to carmi

2

hvnDMV, on Nov 25, 2008 7:23:41 pm GMT

Thank you for your reply.
Yes. I have a permission to access MVS.
My case is uploading a local file to a specific remote file in MVS.
My coding established a connection from client to host successfully. After the connection is established, I sent commands TYPE and SITE to host successfully. However I can not send command STOR from client to MVS to create a remote file. Here is my coding.

strRemoteFullFName = "MW.BARCODE.UPLOAD.TEST.D08001"
objSocketFTP.SendFTPCommand("STOR " & UCase(strRemoteFullFName))

Public Sub SendFTPCommand(ByVal pstrFTPCommand As String)
Dim byteCommand As Byte()
Dim byteLen As Integer

'Check to make sure the parameter has been supplied
If pstrFTPCommand.Length = 0 Then
Throw New Exception("You must supply a command to the SendFTPCommand")
Exit Sub

End If

Try
byteCommand = _TEXT.Encoding.ASCII.GetBytes((pstrFTPCommand & vbCrLf).ToCharArray())
byteLen = byteCommand.Length

'Send the command(in bytes) to host. Note: Host was connected to client in earlier.
Socket.Send(byteCommand, byteLen, _SOCKETS.SocketFlags.None)

'Get message returned from host.
ReadFTPReply()

Catch er As Exception
Throw New Exception("Sub SendFTPCommand: error sending command to remote server.")
Exit Sub
End Try
End Sub
Thank you so much for your helps and suggestions.
Howard N.

Reply to hvnDMV

3

 carmi, on Nov 25, 2008 7:50:25 pm GMT

1. Why don't yoy to upload the file directly from the MVS? usually this is the best solution.
2. Try to use the SEND command instead of the STOR
3. put the files in apostrophes SEND a.txt 'a.b.c.d'
4. if the file doesn't exist in the MVS, you should create it (again the preferred method is to start the process of uploading the file FROM the MVS and not vice versa. to create it see the DCB commands description in the following link http://www.isc.ucsb.edu/tsg/ftp-to-mvs.html

what is the error code you get?

Cheers
Carmi Sternberg

Reply to carmi