LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (August 2007, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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)
Comments: To: Chang Chung <chang_y_chung@HOTMAIL.COM>
In-Reply-To:  <200708222026.l7MAkaET015789@mailgw.cc.uga.edu>
Content-Type: text/plain; charset="us-ascii"

Nice tech-note-digging. Thanks for sharing.

-----Original Message----- 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 spaces)

On Wed, 22 Aug 2007 12:55:58 -0700, Terjeson, Mark <Mterjeson@RUSSELL.COM> wrote:

>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. > >1 >2 %macro timestamp(); >3 %*;%sysfunc(datetime(), datetime21.2) >4 %mend timestamp; >5 >6 %put It is now %timestamp().; >It is now 22AUG2007:12:41:04.12(). > >Please take note the parens are there! ...

hi,

An interesting problem. On my sas 9.1.3 sp4 on winXP does the right thing 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 been a known but not fixed problem (too low a priority) on all platforms of sas v6 and on some platforms of sas v8. I am not sure about sas v9 other than winXP.

SAS NOTE V6-MACRO-7463: (no fix available) http://support.sas.com/techsup/unotes/V6/7/7463.html

SAS NOTE SN-V8+-000448: (problem only for certain platforms) http://support.sas.com/techsup/unotes/SN/000/000448.html

Cheers, Chang


Back to: Top of message | Previous page | Main SAS-L page