115 pts.
 DBF in AS/400 – last record written
Hi ,

There is  file which has 6 fields and the first four as its key. Is there any way to figure out which is the last record written into it.

 

Thanks



Software/Hardware used:
as400 , rpgle
ASKED: June 22, 2011  3:58 PM
UPDATED: June 22, 2011  9:12 PM

Answer Wiki:
Using DSPPFM will show you the records in the sequence they were written. Unless there were deleted records in the file and the file was set to use deleted records. If you journal the file, you will be able to get them from the journal receiver in sequence. Or if you put a timestamp as one of the fields in the PF.
Last Wiki Answer Submitted:  June 22, 2011  5:33 pm  by  CharlieBrowne   32,855 pts.
All Answer Wiki Contributors:  CharlieBrowne   32,855 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Journal entries are the best way, and potentially the only certain way. A timestamp field that allows a default will get current time if a value is not specified at the time of INSERT.

Tom

 108,055 pts.