Should work just like this:
** THEN, IN YOUR PROGRAM #1 PUT THIS AT THE **END** ;
%startstop(beginning=0, lib=<YOUR LIBREF>);
** and in PROGRAMS #2 and higher, put this at the beginning: ;
%startstop(beginning=1, lib=<YOUR LIBREF>);
** ... and this at the end ;
%startstop(beginning=0, lib=<YOUR LIBREF>);
beginning=1 is just telling the macro to run the part of the code that's needed for the START of a program (for all those #2 and higher) -- it checks whether the 'continue' file exists, aborts if not, and deletes it and continues if so.
beginning=0 tells it to run the part of the code needed for the END of each program (creates the 'continue' file).
That should work, but I think the easiest solution is just the driver file proposed by @SASKiwi though -- just a program that %includes all of your other programs, in order. If you do that, I would suggest adding: OPTIONS ERRORABEND; to the top of the driver program. This will cause the program to *stop* if it encounters an error rather than going into syntax check mode and continuing. If you don't add this option and the programs have never run before (i.e., there are no datasets in existence from a previous run), syntax-check mode still seems to create empty datasets, which can be a little weird / misleading.
... View more