Page 1 of 1

Ftp text file from PC to mainframe

PostPosted: Thu Apr 14, 2011 12:49 pm
by maragatham
Hi,

I am trying to ftp a file from my local machine to a mainframe system.
I am running the PUT command from command prompt.

The text file that i have in my local machine has some XML data spreaded to pages. I have defined the destination mainframe file on mainframe with DCB = 500. The transfer was successful but the data is getting truncated when i am loading the file into mainframe. The mainframe file has got only one line with 500 characters. And the rest of the data are truncated.

Although the destination file is 500 characters I want the XML data as such from the notepad. i,e one XML tag per line.

Please help me with this.

Re: Ftp text file from PC to mainframe

PostPosted: Thu Apr 14, 2011 2:55 pm
by Robert Sample
Are you sending the data as binary or text?

Did you define the mainframe file as fixed or variable?

Have you verfified the data is valid on the PC?

What FTP options are you using in your transfer?

Basically, all you are telling us is that your process didn't work. If you want help, you're going to have to provide a lot more data. In general, you are getting one line on the mainframe because the FTP process is not recognizing line terminators. A Windows system typically uses carriage return / line feed (CR/LF or CRLF) to end a line of text. A Unix system typically uses a line feed (LF) to end a line of text. Mainframes don't use line terminators since they are record-oriented. Depending upon where the file was generated, how it got to the Windows machine, and the encoding of the file on the PC (ASCII? UTF-8? UTF-16? something else entirely?) it may or may not be possible to transfer the file to the mainframe in a recognizable format.

Re: Ftp text file from PC to mainframe

PostPosted: Thu Apr 14, 2011 4:58 pm
by steve-myers
"PUT command from command line" doesn't make any sense. I don't think there is such a thing. Do you mean something like "PUT command in FTP?"

DCB=500 also does not make any sense. Again, there is no such thing. Do you mean DCB=(RECFM=VB,LRECL=500)?

Re: Ftp text file from PC to mainframe

PostPosted: Thu Apr 14, 2011 5:17 pm
by MrSpock
Take a hex dump of one or two records from your file from your PC, and post the results here. That process will help to determine if the data is correctly formatted or not.