Macros for SAS Application Developers
https://github.com/sasjs/core
Loading...
Searching...
No Matches
mp_lockfilecheck.test.sas
Go to the documentation of this file.
1/**
2 @file
3 @brief Testing mp_lockfilecheck macro
4
5 <h4> SAS Macros </h4>
6 @li mp_lockfilecheck.sas
7 @li mp_assert.sas
8 @li mp_reseterror.sas
9
10**/
11
12
13/* check for regular lock */
14data work.test; a=1;run;
15%mp_lockfilecheck(work.test)
16
17%mp_assert(
18 iftrue=(&syscc=0),
19 desc=Checking regular table can be locked,
20 outds=work.test_results
21)
22
23
24/* check for unsuccessful lock */
25%global success abortme;
26%let success=0;
27%macro mp_abort(iftrue=,mac=,msg=);
28 %if &abortme=1 %then %let success=1;
29%mend mp_abort;
30
31%mp_lockfilecheck(sashelp.class)
32
33%mp_reseterror()
34
35%mp_assert(
36 iftrue=(&success=1),
37 desc=Checking sashelp table cannot be locked,
38 outds=work.test_results
39)