It is possible to add conditional SAS macro logic that tests expected conditions and only execute a particular code-piece when the condition is / is not met.
With this instance you can wrap code around the first DATA step to only execute it if the file being output does not already exist. You would use the EXIST(...) function as shown below:
%IF %SYSFUNC(EXIST())=0 %THEN %DO;
* do your DATA step code here. ;
%END;
There are other techniques that can be exploited, such as using "gate" macro variable flags (or alternatively a temporary "gate" SAS file, instead), to set a value/condition as a SAS global MACRO variable, as your program progresses, and test for the file/variable existence and perform or skip SAS code pieces as needed.
Scott Barry
SBBWorks, Inc.
Suggested Google search argument, this topic / post:
conditional code execution site:sas.com