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 2002, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 7 Jan 2002 14:30:45 -0800
Reply-To:     Steve <steve.silver@SUNTRUST.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Steve <steve.silver@SUNTRUST.COM>
Organization: http://groups.google.com/
Subject:      Re: macro parameter in date variable
Content-Type: text/plain; charset=ISO-8859-1

Hello Lu,

Is ON_FILE_DT a SAS date? If so you may want to try SAS date constants in your where clause ie; ... between "01jan&year"d and ....

Steve

Lu.Liu@TALBOTS.COM (Lu Liu) wrote in message news:<ACB8CFBB17DCD311B71D00508B6A7FD407E779F0@hinems01.talbots.com>... > Hi, > > Can part of date variable be substituted with macro parameter in macro? > Please see the example below. Can I use &YEAR to substitue the year portion > of the date variable '2001-01-01' and write &year || '-01-01' in macro? > > %MACRO ORGSRC(YEAR); > OPTIONS DB2SSID=TAP; > PROC DB2EXT OUT=Y&YEAR; > SELECT MIN(CUST_NUM) AS MINNUM, MAX(CUST_NUM) AS MAXNUM > FROM D2PICON.THOUSE > WHERE ON_FILE_DT BETWEEN &YEAR||'-01-01' AND &YEAR||'-12-31'; > RUN; > %MEND ORGSRC; > > I am getting resource limit exceeded error message so I cannot tell whether > the above will work or not. If there are alternative codes that will use > less resource, can you also share with me? > > Thanks, > Lu


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