search and replace in a file

Hi
I have to search & replace column in the file.For example ..below iam having File1. in which 3rd column ...if it is A it should be 'ACT' if P it should be 'PAD' and if it ils D it should be 'DEC'

I have to pass column no ,value and to be converted value as variables in to the code . because iam storing these conversion values in one table

in this case i have to pass 3 , A ,ACT 3,P,PAD 3,D,DEC as variables

File:

E100|0|A|1000
E100|1|p|2000
E101|3|D|3000

Result:

E100|0|ACT|1000
E100|1|PAD|2000
E101|3|DEC|3000

can any one help ...........

if the format is fixed, why not just replace |A| to |ACT|, |P| to |PAD| using sed?

Because i am having 10,000 rows and 50 columns .....not only mensioned column so many columns have to converted ....

I have to pass column no and conversion value and converted value ...as parameters to the code ........kindly help ........it is little urgent ....

earlier iam are using below it is not working ...can u help me please ..because on column may have different conversion values ....

awk 'BEGIN { FS=OFS=","}$5=="E001"{ $5="sath"}$6=="E000"{ $6="SSAA"}1' mass > mass1