Date: Wed, 22 Aug 2007 13:29:33 -0700
Reply-To: "Terjeson, Mark" <Mterjeson@RUSSELL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Terjeson, Mark" <Mterjeson@RUSSELL.COM>
Subject: Re: macro with no params (was: nested macros and leading spaces)
Content-Type: text/plain; charset="us-ascii"
Thanks for sharing.
From: Chang Chung [mailto:chang_y_chung@HOTMAIL.COM]
Sent: Wednesday, August 22, 2007 1:27 PM
To: SAS-L@LISTSERV.UGA.EDU; Terjeson, Mark
Subject: Re: macro with no params (was: nested macros and leading
On Wed, 22 Aug 2007 12:55:58 -0700, Terjeson, Mark
>I guess we're both right. and it looks like
>it depends on what version of SAS you are
>using. My results on my machine are different
>that what you show.
>2 %macro timestamp();
>3 %*;%sysfunc(datetime(), datetime21.2)
>4 %mend timestamp;
>6 %put It is now %timestamp().;
>It is now 22AUG2007:12:41:04.12().
>Please take note the parens are there!
An interesting problem. On my sas 9.1.3 sp4 on winXP does the right
and eats up the parens on the macro invocation. On others, the sas notes
recommend that not using parens as Mark says. It seems that this has
known but not fixed problem (too low a priority) on all platforms of sas
and on some platforms of sas v8. I am not sure about sas v9 other than
SAS NOTE V6-MACRO-7463: (no fix available)
SAS NOTE SN-V8+-000448: (problem only for certain platforms)