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 (April 1997, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 24 Apr 1997 01:41:10 -0500
Reply-To:   us4humans@sprintmail.com
Sender:   "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:   us4humans@SPRINTMAIL.COM
Organization:   Sprint Internet Passport
Subject:   Re: Array Help
Content-Type:   text/plain; charset=us-ascii

What a great application for multidimensional arrays. Just use the year and the month to determine the element of the array. Then when your done use a drop or keep statement to keep only what you want.

data foo ; array fooba{96:97, 1:12} <if you're particular about the names, place them here, ie jan96a feb96a ... jan97a feb97a> ; array foobb{96:97, 1:12} <if you're particular about the names, place them here, ie jan96b feb96b ... jan97b feb97b> mondt = input(month,monyy5.) ; yr = year(mondt) ; mon = month(mondt) ; fooba{yr, mon} = var1 ; foobb{yr, mon} = var2 ; run ;

I hope that works for you.

Jerry Voight


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