5.4 How can I make sure, that the sequence of records stored in a TurboIMAGE detail dataset corresponds to the time when they are entered? I do not want TurboIMAGE to reuse the space of a deleted record, but to add the new entry at the end of the set.

You could enable HWMPUT. This will force TurboIMAGE to place the records at the highwater mark.

If the intent is for performance reasons; i.e. you do not want the disk IO associated with reusing a deleted record, then simply enable the HWMPUT feature in DBUTIL, or better yet programmatically by:

* THIS TURNS ON HWMPUT DYNAMICALLY!

CALL "DBCONTROL" USING DBNAME, DBDUMMY, MODE9, DBSTATUS.

If the intent is to be 100% 'sure' that DBGET returns the records in the exact sequence that they were originally added then you have to add a time date stamp or a sequence counter. Many people prefer to read and sort on this field instead of specifying it as a sort item on a path. But this choice is highly application dependent.

Note that even if entries are originally added at the High Water Mark it is very risky to rely on this sequence for mode 2 DBGET for future sequential retrieval. When the dataset's HWM reaches its maximum capacity, it will begin using the delete chain when new records are added, thus destroying one's premise that the relative order of the entries corresponds to their chronology.