Macros for SAS Application Developers
https://github.com/sasjs/core
Loading...
Searching...
No Matches
mp_wait4file.sas File Reference

Wait until a file arrives before continuing execution. More...

Go to the source code of this file.

Detailed Description

Loops with a sleep() command until a file arrives or the max wait period expires.

Example: Wait 3 minutes OR for /tmp/flag.txt to appear

mp_wait4file(/tmp/flag.txt , maxwait=60*3)

Parameters
[in]fileThe file to wait for. Must be provided.
[in]maxwait=(0) Number of seconds to wait. If set to zero, will loop indefinitely (to a maximum of 46 days, per SAS [documentation]( https://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a001418809.htm )). Otherwise, execution will proceed upon sleep expiry.
[in]interval=(1) The wait period between sleeps, in seconds

Definition in file mp_wait4file.sas.