Here's how to have a second project kick off after the successful completion of the first project (2 separate SAS EG sessions).
1.At the end of project1, have it overwrite an existing dataset in a commonly accessible permanent folder.
data common.proj1ended; ended=datetime(); format endit b8601dt.; RUN;
2. At the beginning of project2, have it create a new temp dataset called 'start' to store the starting time of project2.
data work.start; start=datetime(); format start b8601dt.; RUN;
3. Then, in project2, read 'start' from work.start and check the modified date of 'proj1ended'
If the modified date of proj1ended is less than 'proj2start', wait 60 seconds and check again.
Have this program linked to the next program of your process flow so that once the modified date of proj1ended exceeds the starttime of project2, the rest of project2 will continue.
%macro loop; proc sql; select start format=b8601dt. into :proj2start trimmed from work.start; quit; %again: proc sql; select modate format=b8601dt. into :proj1ended trimmed from DICTIONARY.tables where libname='COMMON' and memname='PROJ1ENDED'; quit; %put &=proj2start &=proj1ended; %if &proj1ended > &proj2start %then %goto ready; /* CALL WAIT(60); sorry...didn't realize wait doesn't work! */
data _null_; rc=sleep(60,1); run;
%put &=proj2start &=proj1ended;