aspose file tools*
The moose likes Sockets and Internet Protocols and the fly likes FTP upload Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "FTP upload " Watch "FTP upload " New topic
Author

FTP upload

Vino Kumar
Greenhorn

Joined: Mar 06, 2010
Posts: 7


I am trying to upload a file from PC to mainframe. I can able to do that successfully.
The file has 200 chars for each line. After uploading in mainframe I can see one line got broke and displayed as 2 lines.

How to make the file display as in original source.

Attached the code



Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19760
    
  20

Welcome to the Ranch!

Does that line contain any special characters? Perhaps a tab, or a carriage return (\r)?


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Vino Kumar
Greenhorn

Joined: Mar 06, 2010
Posts: 7
Thanks for the quick response.

The chars at the end of the line appear in the next line after uploading.

The alignment may not be as in the file. I couldnt attach the text file. The length of a line is 200 chars.
Spaces between chars that are highlighted in different colours



000946002-510A Endorsement1 00.046
000946004-578AIP Endorsement3 00.208
000935636-583D Endorsement6 00.091
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42601
    
  65
Try using binary mode instead of ASCII mode; the file should remain unchanged in that case.


Ping & DNS - my free Android networking tools app
Vino Kumar
Greenhorn

Joined: Mar 06, 2010
Posts: 7
While using binary, the file content is not readable in mainframe...
Vino Kumar
Greenhorn

Joined: Mar 06, 2010
Posts: 7
I guess the mainframe takes default record length 80. If so how to set record length as 200
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19760
    
  20

Which editor are you using?
Vino Kumar
Greenhorn

Joined: Mar 06, 2010
Posts: 7
I am not using any editor.. I looked at the inofrmation using i that says record length as 80..
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19760
    
  20

And how did you look at that information?
Vino Kumar
Greenhorn

Joined: Mar 06, 2010
Posts: 7
Attached the image from host


[Thumbnail for host file info.JPG]

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: FTP upload