Ftp text file from PC to mainframe

Post anything related to mainframes (IBM & UNISYS) if not fit in any of the above categories

Ftp text file from PC to mainframe

Postby maragatham » Thu Apr 14, 2011 12:49 pm


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.
Posts: 9
Joined: Tue Nov 09, 2010 3:08 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Ftp text file from PC to mainframe


Re: Ftp text file from PC to mainframe

Postby Robert Sample » Thu Apr 14, 2011 2:55 pm

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.
Robert Sample
Global moderator
Posts: 3090
Joined: Sat Dec 19, 2009 8:32 pm
Location: Bellevue, Iowa
Has thanked: 1 time
Been thanked: 176 times

Re: Ftp text file from PC to mainframe

Postby steve-myers » Thu Apr 14, 2011 4:58 pm

"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)?
Global moderator
Posts: 1771
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 167 times

Re: Ftp text file from PC to mainframe

Postby MrSpock » Thu Apr 14, 2011 5:17 pm

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.
User avatar
Global moderator
Posts: 811
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 2 times

Return to All other Mainframe Topics


  • Related topics
    Last post