forked from ptatian/uiautos
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathNote_put.sas
More file actions
70 lines (39 loc) · 1.58 KB
/
Copy pathNote_put.sas
File metadata and controls
70 lines (39 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/******************* URBAN INSTITUTE MACRO LIBRARY *********************
Macro: Note_put
Description: Write a macro-generated note message to the SAS LOG
using PUT.
Use: Within data step
Author: Peter Tatian
***********************************************************************/
%macro Note_put(
Macro=, /* Macro name */
Msg= /* Note message */
);
/*************************** USAGE NOTES *****************************
SAMPLE CALL:
%Note_put( macro=MyMacro, Msg="This is a note." )
*********************************************************************/
/*************************** UPDATE NOTES ****************************
11/07/04 - If Macro= parameter blank, does not include [macroname] in
message. Reformatted to hide resolved NOTE label in LOG.
09/07/05 - Reformatted so that message will be displayed in color
in SAS Enhanced Editor.
*********************************************************************/
%***** ***** ***** MACRO SET UP ***** ***** *****;
%local SYL1 SYL2;
%***** ***** ***** ERROR CHECKS ***** ***** *****;
%***** ***** ***** MACRO BODY ***** ***** *****;
%let SYL1 = "NO";
%if %length( ¯o ) = 0 %then %do;
%let SYL2 = "TE:";
%end;
%else %do;
%let SYL2 = "TE: [&Macro]";
%end;
put &SYL1 &SYL2 " " &Msg;
%mend Note_put;
/************************ UNCOMMENT TO TEST ***************************
data _null_;
%Note_put( macro=MyMacro, Msg="This is a note." )
run;
/**********************************************************************/