System Options for Macros |
Valid in: |
| ||||
Type: | System option | ||||
Default: | a blank | ||||
PROC OPTIONS GROUP= | MACRO | ||||
See also: | MINOPERATOR System Option and %MACRO Statement |
Syntax | |
Details | |
Example | |
SAS Log Output |
Syntax |
MINDELIMITER=<"option"> |
is a character enclosed in double or single quotation marks.
The character will be used as the delimiter for the macro IN operator. Here
is an example:
double quotation marks
mindelimiter=",";or single quotation marks
mindelimiter=',';
Details |
The option value is retained in original case and can have a maximum length of one character. The default value of the MINDELIMITER option is a blank.
You can use the # character instead of IN.
Note: When the IN or # operator is used in a macro, the delimiter that is used at the execution time of the macro is the value of the MINDELIMITER option at the time of the compilation of the macro. A specific delimiter value for use during the execution of the macro other than the current value of the MINDELIMITER system option might be specified on the macro definition statement:
%macro macroname / mindelimiter=',';
Example |
The following is an example using a specified delimiter in an IN operator:
%put %eval(a in d,e,f,a,b,c); /* should print 0 */ %put %eval(a in d e f a b c); /* should print 1 */ option mindelimiter=','; %put %eval(a in d,e,f,a,b,c); /* should print 1 */ %put %eval(a in d e f a b c); /* should print 0 */
SAS Log Output |
NOTE: Copyright (c) 2007-2008 by SAS Institute Inc., Cary, NC, USA. NOTE: SAS (r) Proprietary Software Version 9.2 (TS A0) Licensed to SAS Institute Inc., Site 0000000001. NOTE: This session is executing on the WIN_NT platform. NOTE: SAS initialization used: real time 1.02 seconds cpu time 0.63 seconds %put %eval(a in d,e,f,a,b,c); /* should print 0 */ 0 %put %eval(a in d e f a b c); /* should print 1 */ 1 option mindelimiter=','; %put %eval(a in d,e,f,a,b,c); /* should print 1 */ 1 %put %eval(a in d e f a b c); /* should print 0 */ 0
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.