getcolvals.test.2.sas
Go to the documentation of this file.
1 /**
2  @file
3  @brief testing getcolvals service
4 
5  <h4> SAS Macros </h4>
6  @li mp_assertcolvals.sas
7  @li mf_getuniquefileref.sas
8 
9 **/
10 
11 %let _program=&appLoc/services/public/getcolvals;
12 
13 %let f1=%mf_getuniquefileref();
14 %let f2=%mf_getuniquefileref();
15 data _null_;
16  file &f1 termstr=crlf;
17  put 'LIBDS:$43. COL:$32.';
18  put "&dclib..MPE_TABLES,LOADTYPE";
19 run;
20 data _null_;
21  file &f2 termstr=crlf;
22  infile datalines4 dsd;
23  input;
24  if _n_=1 then do;
25  put 'GROUP_LOGIC:$char3. SUBGROUP_LOGIC:$char3. SUBGROUP_ID:8. '@;
26  put 'VARIABLE_NM:$char32. OPERATOR_NM:$char10. RAW_VALUE:$char4000.';
27  end;
28  put _infile_;
29  putlog _infile_;
30 datalines4;
31 AND,OR,1,LIBREF,CONTAINS,"'DC'"
32 AND,OR,1,LIBREF,CONTAINS,"'VIYA'"
33 AND,OR,2,DSN,=,"'MPE_LOCK_ANYTABLE'"
34 AND,OR,2,DSN,=,"'MPE_X_TEST'"
35 ;;;;
36 run;
37 %mp_testservice(&_program,
38  viyacontext=&defaultcontext,
39  inputfiles=&f1:iwant &f2:filterquery,
40  outlib=web2
41 )
42 
43 data work.vals2;
44  set web2.vals;
45  putlog (_all_)(=);
46 run;
47 
48 data work.check;
49  type='UPDATE'; output;
50 run;
51 %mp_assertcolvals(work.vals2.unformatted,
52  checkvals=work.check.type,
53  desc=Checking loadtype for DCLIB in MPE_TABLES,
54  test=ALLVALS
55 )
56