Use the modulo (remainder) operator % on NR. NR % 100 would give 1,2,3...99,0,1,2..., so it needs a bit of tweaking. This should do:
awk '{ print (NR-1) % 100 + 1, $1 }' p2.dat > p3.dat
This, of course is an answer to the original question,original question, not the modified one.