Macros for SAS Application Developers
https://github.com/sasjs/core
mddl_dc_filterdetail.sas
Go to the documentation of this file.
1 /**
2  @file
3  @brief Filtertable DDL
4  @details For storing detailed filter values. Used by
5  mp_filterstore.sas.
6 
7 **/
8 
9 
10 %macro mddl_dc_filterdetail(libds=WORK.FILTER_DETAIL);
11 
12 %local nn lib;
13 %if "%substr(&sysver,1,1)" ne "4" and "%substr(&sysver,1,1)" ne "5" %then %do;
14  %let nn=not null;
15 %end;
16 %else %let nn=;
17 
18  proc sql;
19  create table &libds(
20  filter_hash char(32) &nn,
21  filter_line num &nn,
22  group_logic char(3) &nn,
23  subgroup_logic char(3) &nn,
24  subgroup_id num &nn,
25  variable_nm varchar(32) &nn,
26  operator_nm varchar(12) &nn,
27  raw_value varchar(4000) &nn,
28  processed_dttm num &nn format=E8601DT26.6
29  );
30 
31  %let libds=%upcase(&libds);
32  %if %index(&libds,.)=0 %then %let lib=WORK;
33  %else %let lib=%scan(&libds,1,.);
34 
35  proc datasets lib=&lib noprint;
36  modify %scan(&libds,-1,.);
37  index create pk_mpe_filterdetail=(filter_hash filter_line)/nomiss unique;
38  quit;
39 
40 %mend mddl_dc_filterdetail;