Removing parts of a specific field

All,
I have a field in a comma seperated file with hundreds of lines and about 20 columns and I wish to remove all numbers after the decimal point in field 4 on each line and output the rest to another file or write it back to itself.

File is like this

20070126, 123.0, GBP, 1234.5678, xxxx, 10, 10, 367.00,
20070127, 126.0, USD, 123.12, xxx, 20, 20,........

What would be the best way to do this.

Any help would be greatly appreciated.

awk -F, '{sub("\.[0-9]+$", "", $4; print}' file

On Solaris, use nawk instead of awk.

Thanks for your help but I get the following error when I run the nawk version on solaris. In this case I am editing field 13 and not 4 as stated in the example.

nawk: syntax error at source line 1
context is
{sub("\.[0-9]+$", "", >>> $13; <<<
nawk: illegal statement at source line 1
missing )

nawk '$4=int($4)' FS=", " OFS=", " filename

That looks good however it seems to have deleted the lines where the field had 0.0 as its value. Which in this file means I have lost about 60000 rows out of 980000

nawk '{$4!=0?$4=int($4):$4=0}1' FS=", " OFS=", " file
awk 'BEGIN { FS=OFS="," } {sub("\.[0-9]+$", "", $13); print}' file

reborg that seems to do the trick except it removes all my ,'s

updated in the previous post.

Thanks very much to both of you that fixed it. Thanks