Macros for SAS Application Developers
No Matches 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)

[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]( )). Otherwise, execution will proceed upon sleep expiry.
[in]interval=(1) The wait period between sleeps, in seconds

Definition in file