Macros for SAS Application Developers
https://github.com/sasjs/core
Loading...
Searching...
No Matches
mv_jobexecute.test.sas
Go to the documentation of this file.
1/**
2 @file
3 @brief Testing mv_jobexecute macro
4
5 <h4> SAS Macros </h4>
6 @li mf_nobs.sas
7 @li mp_assert.sas
8 @li mp_assertscope.sas
9 @li mv_createjob.sas
10 @li mv_jobexecute.sas
11
12**/
13
14%let path=&mcTestAppLoc/jobs;
15
16filename ft15f001 temp;
17data _null_;
18 file ft15f001;
19 put 'data _null_;';
20 put ' put "executed by mv_jobexecute";';
21 put 'run;';
22run;
23%mv_createjob(path=&path, name=executejob)
24
25%mp_assertscope(SNAPSHOT)
26%mv_jobexecute(path=&path, name=executejob, outds=work.joblinks)
27%mp_assertscope(COMPARE,
28 desc=mv_jobexecute does not leak scope,
29 ignorelist=MC0_JADP1LEN MC0_JADP2LEN MC0_JADP3LEN MC0_JADP4LEN MC0_JADPNUM
30 MC0_JADVLEN MC6_JADP1LEN MC6_JADP2LEN MC6_JADP3LEN MC6_JADPNUM MC6_JADVLEN,
31 outds=work.test_results
32)
33
34%mp_assert(
35 iftrue=(%mf_nobs(work.joblinks)>0),
36 desc=Check the execution returned a set of links
37)
38
39data _null_;
40 set work.joblinks;
41 if rel='state' then call symputx('stateuri',href,'l');
42run;
43%mp_assert(
44 iftrue=(%length(&stateuri)>0),
45 desc=Check a state uri was returned for the running job
46)