Note, use of <SkipDisplay> in a last frame item prior to version 18.104.22.168 of DMDX would result in the job being aborted and any data not being saved. This has now been rectified.
Also note that unless preservevm has been used between item files DMDX is going to shut the screen down and some displays will either flick back to the desktop or the DMDX dialog display momentarily, not much we can do about that (assuming preservevm is out of consideration of course). But some other displays switch back to a previous item's display and here we can actually do something. Putting an <EraseAll> in the last frame will clear all the back buffers (that have previous item's displays still in them) and fixes the problem because even if the video drivers display another buffer at least it will be blank (or the last item's display).
See <loadcounters> for details on setting up a re-entrant item file using <chain> .
Note that the Syntax check prior to version 22.214.171.124 of DMDX can be a bit freaky when chaining item files as it doesn't stop at <lastframe> items, it continues to the actual end of the item file before then chaining to whatever the last chain specified (meaning if you've got more than one possible chained item file things will not be proceeding as one might expect). On top of that if your item file sequence chains back to a previous item file infinite loops are squarely in play so in version 126.96.36.199 I just stopped the chain keyword from doing anything in a syntax check which means if you need to do a syntax check with chained series of item files you'll have to check them individually. Prior to 188.8.131.52 I tended to use Diagnostic runs to syntax check chained item files and I also tend to use Diagnostic Branching as well as any time I'm using more than a simple chain of item files (ones that start with one item file and then proceed linearly through a given sequence with no repeated files) I'm usually also branching like a SOB and in the Introduction (the absolute mother of all chained item files) I even go to the bother of detecting when a diagnostic run is in place and use macros to not ask to repeat a given section as in a diagnostic run the RT is always going to be positive and the value of the item's number. I do that by specifying a really low subject timeout and if I detect an RT above that I set a macro up to not ask questions otherwise it sets it up to ask questions:
The introduction uses item 777 to mark the start of sections that can be repeated, later on at the end of those sections the items that would cause an infinite loop in diagnostic mode just use macro B that is either capable of branching back to the most recent item 777 or not: