Loading...
Searching...
No Matches
stagedata.test.1.sas
Go to the documentation of this file.
1/**
2 @file
3 @brief testing stagedata with row_level_security table
4
5 <h4> SAS Macros </h4>
6 @li mf_getuniquefileref.sas
7 @li mx_testservice.sas
8 @li mp_assert.sas
9
10
11**/
12
13%let _program=&appLoc/services/editors/stagedata;
14
15/**
16 * Test 1 - basic send
17 */
18
19%let f1=%mf_getuniquefileref();
20data _null_;
21 file &f1 termstr=crlf;
22 put 'ACTION:$char4. MESSAGE:$char40. LIBDS:$char38.';
23 put "LOAD,Testing upload of RLS table,&dclib..MPE_ROW_LEVEL_SECURITY";
24run;
25
26%let f2=%mf_getuniquefileref();
27data _null_;
28 file &f2 termstr=crlf;
29 x=round(ranuni(0)*100000,1);
30 y=cats(x);
31 z=cats('"',"'",x,"'",'"');
32 put 'RLS_SCOPE:$char3. RLS_GROUP:$char9. RLS_LIBREF:$char8. '@;
33 put 'RLS_TABLE:$char32. RLS_GROUP_LOGIC:$char3. RLS_SUBGROUP_LOGIC:$char2. '@;
34 put 'RLS_SUBGROUP_ID:best. RLS_VARIABLE_NM:$char32. RLS_OPERATOR_NM:$char2. '@;
35 put 'RLS_RAW_VALUE:$char40. RLS_ACTIVE:best. _____DELETE__THIS__RECORD_____:$char2.';
36 put "ALL,dcviewers,&dclib,MPE_ROW_LEVEL_SECURITY,AND,OR,0,RLS_ACTIVE,NE,"@;
37 put y ",0,No";
38 put "ALL,SASAdministrators,&dclib,MPE_ROW_LEVEL_SECURITY,AND,OR,0,RLS_SCOPE,NE,"@;
39 put z ",0,No";
40run;
41%mx_testservice(&_program,
42 viyacontext=&defaultcontext,
43 inputfiles=&f1:sascontroltable &f2:jsdata,
44 outlib=web1,
45 mdebug=&sasjs_mdebug
46)
47
48%let status=0;
49data work.sasparams;
50 set web1.sasparams;
51 putlog (_all_)(=);
52 if status='SUCCESS' then call symputx('status',1);
53run;
54
55
56%mp_assert(
57 iftrue=(&status=1),
58 desc=Checking successful submission of a two row RLS table,
59 outds=work.test_results
60)
61