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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FTP DB2 file from Iseries to our FTP server and converting to Excel

Status
Not open for further replies.

Reaper73

Programmer
Jun 20, 2005
11
US
I need to FTP a file from our Iseries to our FTP server as an Excel file .xml so we can then FTP this file to an outside company. When I do this and bring the file up in Excel the data is readable(except for one numeric field) but doesn't line up in columns. When I use client access it is fine. I need this process to work with no human interaction.

Any help is greatly appreciated
 
I'm guessing that the numeric field in question is defined as packed. FTP does not like packed fields very much.

I would use CPYTOIMPF to copy the file to a comma-delimited file in the IFS, and then transfer that.

Code:
CPYTOIMPF FROMFILE(YOUR_LIB/YOUR_FILE) +
TOSTMF('/your_IFS_Path/your_stream_file.csv') + 
MBROPT(*ADD) RCDDLM(*CRLF) FLDDLM(',')

Tibi gratias agimus quod nihil fumas.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top