Spliting file based on condition

Hi,

I have a comma separated file with millions of records in it.

I have a requirement to split the file based on the value in a one of the columns.

Suppose i have a text file with columns like C1, C2,C3,C4

Column C4 can hold the values either 01 or 02 03 or 04.

I nned to extract the records which are having C4=04 into a separate file.

Could i get any help on this?

Many Thanks,
Raam

cat file | awk '$4="04" { print $1 $2 $3 $4 }' > new_file

awk -F, '$4=="04"' infile > outfile