Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Carriage return problem with a .csv file (as400 to pc via ftp)

Status
Not open for further replies.

hogler

Programmer
Jun 11, 2003
7
0
0
DK
I try to get a .csv file from our AS400 system with FTP.
But when i recive the file, there is no carriage retun in it, all the data is one long string.

Is there anyone who knows a solution on my problem,a FTP transfer mode or something?

Best regards
Holger
 
Are you using CPYTOIMPF to generate the flat file, or a custom program?

I think the problem is how the .csv file is being generated on the AS/400. The most straightforward way to do this is to create a flat file with no DDS and a record length long enough for all the fields in the PF, and use CPYTOIMPF to that flat file.

One possible drawback is that CPYTOIMPF doesn't trim out the whitespace in the resultant flat file.

When you FTP the flat to your other system, make sure you are in ASCII mode. The CR/LF should be at the end of the line (I've never had that problem when I use CPYTOIMPF to generate the file for transfer).

Me transmitte sursum, Caledoni!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top