If you don't know the filename until run time, the idiom is
FNR == NR
(unless you know of another way).