getcolvals.test.3.sas
Go to the documentation of this file.
1 /**
2  @file
3  @brief testing getcolvals service with FORMATS
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 
14 data work.iwant;
15  LIBDS="DCTEST.DCFMTS-FC";
16  COL="FMTNAME";
17 run;
18 %let f2=%mf_getuniquefileref();
19 data _null_;
20  file &f2 termstr=crlf;
21  infile datalines4 dsd;
22  input;
23  if _n_=1 then do;
24  put 'GROUP_LOGIC:$char3. SUBGROUP_LOGIC:$char3. SUBGROUP_ID:8. '@;
25  put 'VARIABLE_NM:$char32. OPERATOR_NM:$char10. RAW_VALUE:$char4000.';
26  end;
27  put _infile_;
28  putlog _infile_;
29 datalines4;
30 AND,OR,1,FMTNAME,CONTAINS,"'MOR'"
31 ;;;;
32 run;
33 %mp_testservice(&_program,
34  viyacontext=&defaultcontext,
35  inputfiles=&f2:filterquery,
36  inputdatasets=work.iwant,
37  outlib=web2
38 )
39 
40 data work.vals2;
41  set web2.vals;
42  putlog (_all_)(=);
43 run;
44 
45 data work.check;
46  type='MORDOR'; output;
47 run;
48 %mp_assertcolvals(work.vals2.unformatted,
49  checkvals=work.check.type,
50  desc=Checking fmtname for filtered format query(DCTEST.DCFMTS-FC),
51  test=ALLVALS
52 )
53