As the first step in the decommissioning of sasCommunity.org the site has been converted to read-only mode.


Here are some tips for How to share your SAS knowledge with your professional network.


Difference between revisions of "Tip of the Day:July 7"

From sasCommunity
Jump to: navigation, search
(Scheduled The SAS XML Mapper)
(Scheduled Now You Can Use the IN Operator in a Macro)
 
Line 5: Line 5:
 
sasCommunity Tip of the Day
 
sasCommunity Tip of the Day
 
</h1><div style="padding:10px;">
 
</h1><div style="padding:10px;">
{{Tips:The SAS XML Mapper}}
+
{{Tips:Now You Can Use the IN Operator in a Macro}}
 
<div style="width:100%"><hr></div>
 
<div style="width:100%"><hr></div>
Feel free to [[Tips Talk:The SAS XML Mapper|comment]] on this tip.
+
Feel free to [[Tips Talk:Now You Can Use the IN Operator in a Macro|comment]] on this tip.
 
</div>
 
</div>
 
</td></tr>
 
</td></tr>

Latest revision as of 23:11, 12 May 2015

sasCommunity Tip of the Day

Starting in SAS 9.2, you can use the IN operator inside of a macro.

options minoperator;
%macro putme(name=)/mindelimiter=',';
	%if %lowcase(&name) in alice,alfred,barbara %then %put &name is in the list;
	   %else %put name is NOT in the list;
%mend;
 
%putme(name=Alice)
%putme(name=Buddy)

The user must specify both the MINOPERATOR global option, the MINDELIMITER local option within the macro definition, and the delimiter for the MINDELIMETER option.

Submitted By Mary Rosenbloom (talk)



Feel free to comment on this tip.


Prior tip - Next tip - Random Tip

Submit a Tip