I'm doing time attendance system where my physical file(PF) have these fields:
User ID(key field),Date,Time In,Time Out
......
the problem is,I try to select for particular User ID and Date and highest value of Time Out for that day. and move the Time Out value to a variable in my program.
how to the RPGLE source would look like?
The traditional way would be to build a logical file with User ID, Date and Time Out as keys, with Date and Time Out descending. Then I think just chaining to the logical using the User ID and today's date as a partial key will give you the latest record.