Loading...
Searching...
No Matches
dc_refreshcatalog.sas
Go to the documentation of this file.
1/**
2 @file dc_refreshcatalog.sas
3 @brief Refresh catalog
4 @details There are two versions of this macro - a META and a VIYA version (in
5 different folders). The interfaces are the same. This version is VIYA.
6
7 The MPELIB should be pre-assigned
8
9 The refresh macros are called from the statements this macro writes into a
10 catalog, so they are not visible as calls to lint.
11
12 @sasjslint {"noUnusedMacros": false}
13
14 <h4> SAS Macros </h4>
15 @li mpe_refreshlibs.sas
16 @li dc_assignlib.sas
17 @li mpe_refreshtables.sas
18 @li mpe_refreshcatalogs.sas
19
20
21 @version 3.4
22 @author 4GL Apps Ltd
23 @copyright 4GL Apps Ltd. This code may only be used within Data Controller
24 and may not be re-distributed or re-sold without the express permission of
25 4GL Apps Ltd.
26**/
27
28%macro dc_refreshcatalog(libref);
29
30%if #&libref# ne ## %then %do;
31 %put &sysmacroname: assigning specific libref, &libref;
32 %dc_assignlib(WRITE,&libref) /* write just in order to assign direct lib */
33 %mpe_refreshlibs(lib=&libref)
34 %mpe_refreshtables(&libref)
35 %mpe_refreshcatalogs(&libref)
36%end;
37%else %do;
38 %mpe_refreshlibs()
39 filename executor catalog 'work.code.code.source';
40 data libraries;
41 set &mpelib..mpe_datacatalog_libs;
42 where &dc_dttmtfmt. le TX_TO;
43 file executor;
44 str=cats('%mpe_refreshtables(',libref,');');
45 put str;
46 str=cats('%mpe_refreshcatalogs(',libref,');');
47 put str;
48 putlog str;
49 run;
50 %if "&sasjs_mdebug"="1" %then %do;
51 /* echo the generated statements, so a failure inside one of them can be
52 traced back to the libref that produced it */
53 %inc executor/source2;
54 %end;
55 %else %do;
56 %inc executor;
57 %end;
58%end;
59
60%mend dc_refreshcatalog;