removing blanks from a file



Greetings
English is not my mother language, so I'd like to apologize in
advance, if this sounds a little funny to you.
Since fortran programmers are running thin in my part of the world,
and since looks like there's a good deal of them here, I was wondering
if you could help me with a little problem I'm having (searched
google, found some half solutions but nothing concrete)

I have a file, which is the output of one of my programs. It's a
script file, and therefore it's not supposed to have blanks in it.
The file looks something like this
1.0, 1.0, 1.0
1.0, 1.0, 1.0
....
and it would be good if it looked like this
1.0,1.0,1.0
1.0,1.0,1.0
....

I tried something like this

CHARACTER(1) :: CH
INTEGER(4) :: IOEND=0
OPEN(1,FILE='FILE.TXT')
DO WHILE (IOEND/=-1)
READ(1, "(A1)", IOSTAT=IOEND, ADVANCE="NO")CH
IF CH=CHAR(49)
CH=CHAR(50)
WRITE(1, "(A1)", ADVANCE="NO")CH
END DO
CLOSE(1)
END

If you try it you will see that it has some drawbacks.

Please, if anyone has some ideas how to solve this problem, I'd be
very grateful, if he/she would share them.

Luka Djigas
ldigas@@gmail.com (kill one monkey)
.