LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (April 2003, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Mon, 14 Apr 2003 17:22:36 -0400
Reply-To:   "Farrer, Andrew C" <Andrew.Farrer@CIBC.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Farrer, Andrew C" <Andrew.Farrer@CIBC.COM>
Subject:   Re: Monthly SAS datasets in a GDG
Comments:   To: Jeff Morison <jmt_mtf@YAHOO.COM>
Content-Type:   text/plain

intck in a macro should do it for you. This seems OK:

%macro gdg(month) ; /* month in ccyymmmdd format */ data _null_ ; gennum = intck('month',today(),"&month"d) ; put gennum= ; call symput ('gennum',compress(gennum)) ; run ; %put ***&gennum**** ; %mend ;

%gdg(01feb2003) ; %put libname mth&gennum "hlq.sasdata(&gennum)" disp = shr ;

%gdg(01feb2002) ; %put libname mth&gennum "hlq.sasdata(&gennum)" disp = shr ;

/* Then */ data whatever ; set mth&gennum..monthly ; /* etc. */

-----Original Message----- From: Jeff Morison [mailto:jmt_mtf@YAHOO.COM] Sent: Monday, April 14, 2003 4:19 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Monthly SAS datasets in a GDG

We have a GDG containing each member a monthly SAS dataset spanning back to 48 months, sometimes I need to access a specific month's data, currently I count back manually to find that specific month's GDG member number and then access that dataset into my data step.

Is there any easy way to do this?.

TIA, Jeff

__________________________________________________ Do you Yahoo!? Yahoo! Tax Center - File online, calculators, forms, and more

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