Macros for SAS Application Developers
https://github.com/sasjs/core
Loading...
Searching...
No Matches
mp_testjob.test.sas
Go to the documentation of this file.
1/**
2 @file
3 @brief Testing mp_testjob macro
4
5 <h4> SAS Macros </h4>
6 @li mp_testjob.sas
7 @li mp_assert.sas
8
9**/
10
11%let t0=%sysfunc(datetime());
12%mp_testjob(duration=5)
13%let elapsed=%sysfunc(intck(second,&t0,%sysfunc(datetime())));
14
15%mp_assert(
16 iftrue=(&syscc=0),
17 desc=Checking that the timed job runs to completion,
18 outds=work.test_results
19)
20
21%mp_assert(
22 iftrue=(&elapsed>=5 and &elapsed<180),
23 desc=Checking that it runs for at least the requested duration,
24 outds=work.test_results
25)