BookmarkSubscribeRSS Feed
0 Likes

I'd like to have process flow A kick off process flow B when it's finished.

2 Comments
paulkaefer
Lapis Lazuli | Level 10

I'll admit, I avoid process flows primarily because of version control and incompatibility with our Linux-based system to schedule/automate jobs.

 

But I am curious, can process flows be called using %include statements in your code? (Reference) We typically have a master process that %includes subprocesses in the desired order, with conditional macros for some.

tomrvincent
Rhodochrosite | Level 12

No, but I figured out a way to daisychain them:

 

at the beginning of pf1, delete temp.pf1.

at then end of pf1, do this:

data temp.pf1; ended=today();run;

at the beginning of pf2, do this:

 

   %do %while (%sysfunc(exist(temp.pf1))=0) ;

        %put not ready ... sleep 5 minutes;

        data _null_;
            seconds= 5 * 60;
            rc=sleep(seconds,1);
            run;
   
   %end;

 

 

That way you can kick off pf1 and pf2 and pf2 won't start until pf1 is done.