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!

Any way to set FTP to ASCII mode?

Status
Not open for further replies.

beardenb

MIS
Jan 16, 2003
36
US
I have a report which is run, exported to text and FTP'd using CE 8.5. The plan is to have a Unix script grab up the FTP'd file and load it into our database (Informix IDS). The mechanics of running, exporting and FTP'ing the file work fine except for one problem: there's a carriage return at the end of each line which causes problems for the database import (using "load from"). The problem would be solved if I could get rid of the carriage return.

By FTP'ing the file manually using an ASCII mode transfer, the carriage return is stripped from the file. However CE must be using binary mode because the carriage return is retained.

I'd like to automate the process but if I can't get the file in the right format this will not be possible. If there's a way to have CE FTP in ASCII mode, I believe my problem will be solved. So any ideas on how to accomplish this would be welcomed.

Thanks,
--Bearden Barnes
 
Pretty weak when a carriage return causes problems at load time on a database...

Depending upon your automation requirements, you might have CE write it to a file, then have a third party scheduling program (there are even freebies) handle the FTP for you.

-k
 
OK, well I won't try to defend Informix' load utility -- it treats the carriage return as valid loadable data and tries to pop it in a column in the table being loaded to. If the table is defined for 6 columns and I've got six columns of data plus carriage return, Informix treats that as 7 columns of data and complains that the number of columns in the load data don't match the table definition. Simple-minded utility I guess.

--Bearden
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top