hw to insert array values sequentially in a file

Hi All :),
I am very new to unix. I am requiring ur help in developing shell script for below problem.
I have to replace the second field of file with values of array sequentially where first field is ValidateKeepVar

<File>
UT-ExtractField 1 | &LogEntry &Keep(DatatoValidate)
VA-ValidateKeepVar 05 &DatatoValidate
Comment Verify Recording Entity
UT-ExtractField 2 | &LogEntry &Keep(DatatoValidate)
VA-ValidateKeepVar LRP_SpsRA_MLP300 &DatatoValidate
Comment Verify Recording Entity Role (16=Requesting/Home/Serving LP)
UT-ExtractField 3 | &LogEntry &Keep(DatatoValidate)

<End of File>
Kindly help me.

Hi,
below may help you, use array (100,200,300) to replace the third field if match 'ValidateKeepVar', if the lines need to be replaced more than array, the exceed lines will use the last item of that array.

nawk -F"[-| ]" 'BEGIN{
n=split("100,200,300",arr,",")
i=1
}
{
	if($2=="ValidateKeepVar")
	{
		$3=arr
		print
		if(i<n)
			i++
	}
	else
		print
}' filename

output:

UT-ExtractField 1 | &LogEntry &Keep(DatatoValidate)
VA ValidateKeepVar 100 &DatatoValidate
Comment Verify Recording Entity
UT-ExtractField 2 | &LogEntry &Keep(DatatoValidate)
VA ValidateKeepVar 200 &DatatoValidate
Comment Verify Recording Entity Role (16=Requesting/Home/Serving LP)
UT-ExtractField 3 | &LogEntry &Keep(DatatoValidate)

Thanx:) Summer_cherry for ur reply, but while using that script.....M getting error message "command not found :nawk"

Wat could b the reason for that??

nawk we use in solaris, try to put awk and check for the output..

Thanks
Namish