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 (January 2010, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 13 Jan 2010 11:28:36 -0800
Reply-To:   Jack Hamilton <jfh@STANFORDALUMNI.ORG>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Jack Hamilton <jfh@STANFORDALUMNI.ORG>
Subject:   Re: Macro question
Comments:   To: mpajoh@ODOT.ORG
In-Reply-To:   <OF15407237.DE737501-ON862576AA.0065F72B-862576AA.0067C47C@fd9ns01.okladot.state.ok.us>
Content-Type:   text/plain; charset=us-ascii

Remove the single quotes around 'month'.

The documentation for %SYSFUNC, at <http://support.sas.com/onlinedoc/913/getDoc/en/mcrolref.hlp/z3514sysfunc.htm>, is incorrect. It says that quotes around character arguments are not required (implying optional), when in fact they are not allowed.

Quotes can be used in the second argument because it's numeric, not character.

-- Jack Hamilton jfh@alumni.stanford.org Caelum non animum mutant qui trans mare currunt.

On Jan 13, 2010, at 10:53 am, Masoud Pajoh wrote:

> All: > The following is a fragment of a much larger macro. > > %macro test( StartDate, EndDate); > %let EndDate=%sysfunc(intnx('month',"&EndDate."d,1)); > %let StartDate=01&StartDate.; > %let where="&StartDate."d<=model<="&EndDate."d; > %mend(test); > > %test( jan09, dec09); > > WHERE should resolve to "01jan09"d<=model<="01jan10"d > But, I get: > > WARNING: An argument to the function INTNX referenced by the %SYSFUNC or > %QSYSFUNC macro function is out of range. > > What is wrong? > > Thanks, > > Masoud


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