-
Notifications
You must be signed in to change notification settings - Fork 16
/
newmacro.sas
77 lines (57 loc) · 2.72 KB
/
newmacro.sas
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
69
70
71
72
73
74
75
76
77
/*******************************************************************************
Copyright (c) <year> <author>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
********************************************************************************
@Author(s):
<Name Surename>
@Contributors:
<Name2 Surename2>
(<Name4 Surename4> etc..)
@Description: description of the macro, what is the reason, etc. etc. The long
line goes like this. So this is a four chars indent.
@Dependencies:
assign_libraries.sas
another_dependency.sas
@Inputs: &DSIN
@Outputs: &DSOUT WORK.STATIC_OUTPUT WORK.DYNAMIC_OUTPUT_: &&MACRO_VARIABLE
@Required parameters:
DSIN=: input dataset, ex. libname.memname or just memname if in WORK lib.
@Optional parameters:
DSOUT=: output dataset, if blank, DSOUT=&DSIN..NEWMACRO To be more
specific how to document, this is a very long sentence. As you can see,
this is an eight character indentation. Just to make this text look
nice.
ANOTHER_PARAM=example: as you can see this parameter has a default value
set (example)
@Notes: Put any related notices here. No need to have version/history - it is
kept within git repository. Explain how macro might work etc etc etc
Don't forget that you can remove anything you don't like in this macro.
To check when the file was last time modified, see @BLOB.
@BLOB: $Id$
*******************************************************************************/
%macro newmacro;
%put Macro &sysmacroname started.;
%local __startdt;
%let __startdt = %sysfunc(datetime());
%put SOME CODE HERE;
%macro_end:
%put Macro &sysmacroname finished in %sysfunc(putn(%sysevalf(%sysfunc(datetime()) - &__startdt), tod.));
%mend newmacro;
/* Usage:
%newmacro;
/**/