Passing shell variable to NAWK

I am trying to make a simple script in which i take input from shell and then forward the value to
nawk (BEGIN).

but when i run below mention script so it give no output.

echo "Enter TRUNK GROUP:"
read TGR

cat /omp-data/logs/5etr/080422.APX | nawk -F"|" -v P=$TGR '

BEGIN {

TG=P;

printf ("DATE IN ST EN  TGN ISEIZE ISATMP   IANS OATMPT   OVFL OSEIZE OSATMP   OANS TOTUSG OOSMTCE   OOS DBLSZR NTWCONG\n");
}

But when i run below code , so its work fine.

#echo "Enter TRUNK GROUP:"
#read TGR
#cat /omp-data/logs/5etr/080422.APX | nawk -F"|" -v P=$TGR '

cat /omp-data/logs/5etr/080422.APX | nawk'

BEGIN {

TG=700;

printf ("DATE IN ST EN  TGN ISEIZE ISATMP   IANS OATMPT   OVFL OSEIZE OSATMP   OANS TOTUSG OOSMTCE   OOS DBLSZR NTWCONG\n");
}

Can someone help me, to run the above code.
Plz Help
Regards

Double post questions is not allowed, please read the:

This is a similar question of your previous thread, if you have more questions about your problem, continue here:

Thread closed.