first thing to do is to get rid of the ^M, you can either make your FTP again (since I guess you did a FTP between a NT and a Unix Box) using binary mode (simply type binary), or you can vi your datafile and do something like :
:%s/^M//
(to get ^M, you type Ctrl-V and then Enter)