Date: Fri, 23 Mar 2012 11:07:38 -0400
Reply-To: Tom Abernathy <tom.abernathy@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Tom Abernathy <tom.abernathy@GMAIL.COM>
Subject: Re: User-Defined Format Name as Parameter in SAS Macro
I usually have the user specify the format, but add logic to append the period
if they forgot it.
%macro xx(format=);
...
%if %bquote(&format)= %then %let format=best12.;
%else %if not %index(&format,.) %then %let format=&format..;
...
... put(pdx,&format)...
%mend xx;
|