I need to copy 7 sas files from unix to windows. To save time, I want to submit the copy statement for each of these at the same time. I'm using the rsubmit and endrsubmit process in a macro loop. This way there are 7 copy statements running at the same time. However, I can't figure out how to make the sas job wait for all the submitted copy statements to finish before continuing. Do I use a waitfor _all_ statement, and where do I put it? %MACRO toWin; %DO i = 1 %TO 7; %SYSLPUT file=file.&i. / remote=sessw&i.; %SYSLPUT mSysDir =unix directory /REMOTE=server-ID>; %SYSLPUT mStgDirW = windows directory /REMOTE=server-ID>; rsubmit sessw&i. connectwait=no connectpersist=no sysrputsync=yes; copy file&i. from unix to windows endrsubmit ; %end ; %mend; %toWin;
... View more