Suspends execution of the current SAS session until the specified tasks finish executing.
Valid in: | anywhere in a SAS program |
Windows specifics: | all |
specifies the name of the task(s) that you want to wait for. See SYSTASK Statement: Windows for information about task names. The task name(s) that you specify must match exactly the task names assigned through the SYSTASK COMMAND statement. You cannot use wildcards to specify task names.
suspends execution of the current SAS session until either one or all of the specified tasks finishes executing. The default setting is _ANY_, which means that as soon as one of the specified task(s) completes executing, the WAITFOR statement finishes executing.
specifies the maximum number of seconds that WAITFOR should suspend the current SAS session. If you do not specify the TIMEOUT option, WAITFOR suspends execution of the SAS session indefinitely.
systask command "sas myprog1.sas" taskname=sas1; systask command "sas myprog2.sas" taskname=sas2; systask command "sas myprog3.sas" taskname=sas3; waitfor _all_ sas1 sas2 sas3;