awk Problem while insert null field to file

Dear All,

I have the following input file. I want to replace data with null values.

I/P File:
9022334455|2008-12-06 06:10:21|2|Error@@@|esoo8erp|
9024334432|2008-12-06 08:40:59|6|Error@@@|6y2o8e6r|

O/P File:

9022334455||2||esoo8erp|
9024334432||6||6y2o8e6r|

Code:
awk -F "|" 'BEGIN{OFS="|"}{$2=" ";$4=" ";print}' i/pfile > out.file

Error:
awk: syntax error near line 1
awk: bailing out near line 1

How can i replace the data with null values ??

Thanks&Regards
Hanuma

this awk code looks fine for me it should work untill and unless you forgot some space or quote inbetween

use nawk or /usr/xpg4/bin/awk on Solaris

awk -F "|" 'BEGIN{OFS="|"}{$2="";$4="";print}'  i/pfile > out.file

dear danmero the error is not due to the " " he is getting some syntax error

Thanks to all,

I got the output from tr command..

 cat i/p file |tr '|' ' '|awk '\{print $1"||"$3"||"$5"|"\}'