Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

FTP upload

 
Vino Kumar
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


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
Pie
Posts: 20669
65
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch!

Does that line contain any special characters? Perhaps a tab, or a carriage return (\r)?
 
Vino Kumar
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try using binary mode instead of ASCII mode; the file should remain unchanged in that case.
 
Vino Kumar
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
While using binary, the file content is not readable in mainframe...
 
Vino Kumar
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess the mainframe takes default record length 80. If so how to set record length as 200
 
Rob Spoor
Sheriff
Pie
Posts: 20669
65
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which editor are you using?
 
Vino Kumar
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not using any editor.. I looked at the inofrmation using i that says record length as 80..
 
Rob Spoor
Sheriff
Pie
Posts: 20669
65
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And how did you look at that information?
 
Vino Kumar
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Attached the image from host
host file info.JPG
[Thumbnail for host file info.JPG]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic