mddl_dc_maxkeytable.sas
Go to the documentation of this file.
1 /**
2  @file
3  @brief Maxkeytable DDL
4  @details For storing the maximum retained key information. Used
5  by mp_retainedkey.sas
6 
7 **/
8 
9 
10 %macro mddl_dc_maxkeytable(libds=WORK.MAXKEYTABLE);
11 
12  proc sql;
13  create table &libds(
14  keytable varchar(41) label='Base table in libref.dataset format',
15  keycolumn char(32) format=$32.
16  label='The Retained key field containing the key values.',
17  max_key num label=
18  'Integer representing current max RK or SK value in the KEYTABLE',
19  processed_dttm num format=E8601DT26.6
20  label='Datetime this value was last updated'
21  );
22 
23  %local lib;
24  %let libds=%upcase(&libds);
25  %if %index(&libds,.)=0 %then %let lib=WORK;
26  %else %let lib=%scan(&libds,1,.);
27 
28  proc datasets lib=&lib noprint;
29  modify %scan(&libds,-1,.);
30  index create keytable /nomiss unique;
31  quit;
32 
33 %mend mddl_dc_maxkeytable;