User ID(key field),Date,Time In,Time Out
REGISTER or login:
The scope of this seems very large.
1. to display records by the highest value of Time Out for a given day
You can create a logical file over your physical file on Date and Time_Out (declinine)
An RPG program can ask for the required date and access the file for the date.
It could loop through the file loading a subfile and display the subfile.