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 (October 2010, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 29 Oct 2010 13:36:00 +0000
Reply-To:     toby dunn <tobydunn@HOTMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         toby dunn <tobydunn@HOTMAIL.COM>
Subject:      Re: How can i take columns dynamically
Comments: To: peesari.mahesh@gmail.com
In-Reply-To:  <AANLkTim8ZxcFHyekT9eOrNd5w8nWuNEAP62XQp3kSFq1@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

You would be better served by having your data in a normalized form: Date Value 01Apr2010 1 01May2010 2 01Jun2010 3 If the Date variable is a SAS Date value, you now have the full functionality of SAS to select the correct months with ease. Then use either Proc Report or Proc Tabulate to create your report. Toby Dunn

"I'm a hell bent 100% Texan til I die"

"Don't touch my Willie, I don't know you that well"

> Date: Fri, 29 Oct 2010 08:21:05 -0500 > From: peesari.mahesh@GMAIL.COM > Subject: Re: How can i take columns dynamically > To: SAS-L@LISTSERV.UGA.EDU > > i need to maintain a report contain information of last 6 months, > means i have a report apr, may,,jun, jul ,aug,sep month data, these months > are columns > in next month when i execute report oct month shouls add to report and apr > month should hidden. > i am writing code for report in proc report or datastep report , here i am > defining columns thru hardcode > when i execute report in next month how oct column will pick? > > > > On Fri, Oct 29, 2010 at 8:09 AM, Fehd, Ronald J. (CDC/OCOO/ITSO) < > rjf2@cdc.gov> wrote: > > > > From: Joe H. Smith > > > Sent: Friday, October 29, 2010 5:59 AM > > > Subject: How can i take columns dynamically > > > > > > Hi, > > > I have a report its presenting last 6 months business data for example > > > > > > Apr May Jun Jul Aug Sep > > > 1 2 3 4 5 6 > > > 5 3 4 6 2 3 > > > > > > In next month when i generate report it should add Oct month and data > > > and > > > hidden Apr month it means the report contains always last 6months from > > > execution date, so how can i take data like that dynamically > > > > your task will be simplified by an order of magnitude > > if you name your variables: > > > > attrib > > mon01 length = 4 label = 'Jan' > > mon02 length = 4 label = 'Feb' > > ... > > mon12 length = 4 label = 'Dec' > > ; > > > > > > Ron Fehd the naming-conventions maven > > > > > > -- > ****** > " The next best thing to winning is losing At least you've been in the > race." > > > ******


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