In reply to Rick Wicklin.

Good point Rick! I updated the example so that it clears TITLE and FOOTNOTE before attempting to restore a value that might not have ever been there.

Our buddy Vince DelGobbo also pointed out that sequences like:

TITLE1 "First title";
TITLE3 "and a smaller title 3";

Would not be restored properly using the current code. Easy enough to correct since it's all in SASHELP.VTITLE, but I leave it as a reader exercise for now.