Formatting large Ascii file

Hi, I've got a very large ASCII file (1.5 GB), which doesn't have line terminators, making it impossible to read it right, i need to format it like:
add line terminators.
delete some lines on the file.
delete some fields on all the remainings lines (can be identified by a string).

After getting the file under the correct format i will inject it into a mysql DB, file details:

ASCII text, with very long lines, with no line terminators, i already tried tr and sed , but i cannot get it right.

hexdump head:

0000000 3136 3937 3934 3134 2032 2020 2020 4120
0000010 5249 2020 4d54 2053 4120 5249 2020 3137
0000020 3131 3131 2030 2020 2020 2020 2020 2020
0000030 2020 2020 2020 2020 2020 2020 2020 2020
*
0000070 2020 2020 2020 2020 2020 2020 3032 3730
0000080 3231 3732 3031 3131 3934 3032 3730 3231
0000090 3732 3330 3030 3030 3130 3038 3130 2020
00000a0 3236 3137 3630 3638 2030 2020 2020 4120
00000b0 5249 2020 4d54 2053 4120 5249 2020 3137
00000c0 3131 3131 2030 2020 2020 2020 2020 2020
00000d0 2020 2020 2020 2020 2020 2020 2020 2020
*
0000110 2020 2020 2020 2020 2020 2020 3032 3730
0000120 3231 3732 3031 3131 3934 3032 3730 3231
0000130 3732 3231 3030 3030 3130 3038 3130 2020
0000140 3236 3537 3332 3737 2036 2020 2020 4120
0000150 5249 2020 4d54 2053 4120 5249 2020 3137
0000160 3131 3131 2030 2020 2020 2020 2020 2020
0000170 2020 2020 2020 2020 2020 2020 2020 2020
*

--

Best regards.

You will have to write a dd command or maybe C or perl, something like that. Most Unix tools have a limit to line size.

How is the format supposed to be? We need examples of input and expected output.

Thanks for your reply, Example input, keep in mind it doesn't have line terminators , so when you open it on big terminals it get imposible to read:

617955555 AIR TMS AIR 7111110 2007122710114920071227030000018001 627166666 AI
R TMS AIR 7111110 2007122710114920071227120000018001 627577777 AIR TMS AIR 7111
110 2007122710114920071227120000018001 627588888 AIR AME AIR 7311110
2007122710114920071227030000018001 627599999 AIR AME AIR 7311110

example output:

617955555 AIR TMS AIR
627166666 AIR TMS AIR
627577777 AIR TMS AIR
627588888 AIR AME AIR
627599999 AIR AME AIR

Best regards.

dd is your friend.
Start with this:

dd ifile=inputfilename ofile=outputfilename cbs=22 conv=unblock

It is late for me - play around with the 22 block size until it works. I think your input block size is 22 with byte 22=space. Read the dd manpage.

cbs=20 did the magic, then sed '/^6/ !d' , best regards.