Required Argument
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=',';
Restriction
The following characters cannot be used as a delimiter
% & ' " ( ) ;
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=',';
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 */
The following is the output to the SAS log:
NOTE: Copyright (c) 2002-2012 by SAS Institute Inc., Cary, NC, USA.
NOTE: SAS (r) Proprietary Software 9.4 (TS1B0)
Licensed to SAS Institute Inc., Site 1.
NOTE: This session is executing on the W32_7PRO 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
370 Chapter 20 • System Options for Macros