It is narrated from Hazrat Abu Hurairah (may Allah be pleased with him) that the Noble Prophet (peace and blessings be upon him) said: On the day of Friday, the angels stand at the doors of the mosque and record the ranks of the people, that such-and-such person came at such-and-such time, such-and-such person came at such-and-such time, such-and-such person came when the Imam was delivering the sermon, and such-and-such person came and only got the prayer but did not get the Friday (reward). They write this as long as no one has missed the sermon.
Hadith Referenceمسند احمد / مسند المكثرين من الصحابة / 10360