but not working as intended logic what i tried to do is in = total numbet of records here 7 then using for loop to loop 7 times---> i =1; NR==1 ##goto rrcord 1 --> store $4 in var and $3 in varb --> NR==varb ## goto record as specified in varb eg 2. them replcace $2 with var. loop over ---> i =2 goto record two and likewise