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 (December 2010, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Sat, 4 Dec 2010 19:03:02 +0530
Reply-To:   vaibhav wadhera <vaibhavwadhera@GMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   vaibhav wadhera <vaibhavwadhera@GMAIL.COM>
Subject:   Re: can any one help
Comments:   To: prasanth kumar <prasanth.or@gmail.com>
In-Reply-To:   <AANLkTi=aEmtkmcP2QHRDo-=SXAHkWnEYAS9rsGR+746y@mail.gmail.com>
Content-Type:   text/plain; charset=ISO-8859-1

Hi...

have a look on this code and let me know whether this serves your purpose

data temp; input id $ accountid $ name $; cards; a 3-GN3KCAJ prasanth a 3-GN7ZRI6 kumar a 3-GNBWRUS rajesh a 3-GNIZQ2M somesh b 3-GNLOOKO rakesh b 3-GNX2AU9 subash b 3-GO4993N karthik c 3-GO5JQ21 rupa c 3-GO6JBFS kotla ; run;

Proc print Data =temp; run;

dATA TEMP; SET TEMP; ID1 = ID; RUN;

proc report data = temp; columns id id1 accountid name n id; define id / GROUP NOPRINT; DEFINE ID1 /id; define accountid / display width=10 ; define name / display; break after ID / ol skip summarize suppress; rbreak after / dol skip summarize; run;

Thanks & Regards Vaibhav Wadhera On Sat, Dec 4, 2010 at 4:58 PM, prasanth kumar <prasanth.or@gmail.com>wrote:

> Hi All, > > i needed the counts of accountid by id wise. > when i am trying to do in proc report, getting > error that accountid should be in numeric. > i am unable to convert the accountid to numeric. > can any one help in getting the report in the > below format. > > > > data temp; > input id $ accountid $ name $; > cards; > a 3-GN3KCAJ prasanth > a 3-GN7ZRI6 kumar > a 3-GNBWRUS rajesh > a 3-GNIZQ2M somesh > b 3-GNLOOKO rakesh > b 3-GNX2AU9 subash > b 3-GO4993N karthik > c 3-GO5JQ21 rupa > c 3-GO6JBFS kotla > ; > run; > > output needed: > id accountid name > a 3-GN3KCAJ prasanth > a 3-GN7ZRI6 kumar > a 3-GNBWRUS rajesh > a 3-GNIZQ2M somesh > total 4 > b 3-GNLOOKO rakesh > b 3-GNX2AU9 subash > b 3-GO4993N karthik > total 3 > c 3-GO5JQ21 rupa > c 3-GO6JBFS kotla > total 2 > overaltotal 9 >

-- Thanks & Regards

Vaibhav wadhera


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