-
Notifications
You must be signed in to change notification settings - Fork 96
/
commas.sas
29 lines (28 loc) · 1.33 KB
/
commas.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
/*<pre><b>
/ Program : commas
/ Version : 1.0
/ Author : Roland Rashleigh-Berry
/ Date : October 2002
/ Contact : [email protected]
/ Purpose : To separate the elements of a list with commas
/ SubMacros : %quotelst
/ Notes : This uses %quotelst to do all the work. You would typically use
/ this to delimit a list of variables with commas for proc sql where
/ it is not known if resolved values equate to anything.
/ Usage : order by %commas(&var1 &var2 &var3);
/
/================================================================================
/ PARAMETERS:
/-------name------- -------------------------description-------------------------
/ str String elements to delimit with commas (pos)
/================================================================================
/ AMENDMENT HISTORY:
/ init --date-- mod-id ----------------------description-------------------------
/
/================================================================================
/ This is public domain software. No guarantee as to suitability or accuracy is
/ given or implied. User uses this code entirely at their own risk.
/===============================================================================*/
%macro commas(str);
%quotelst(&str,quote=%str(),delim=%str(, ))
%mend;