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 (June 2008, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 17 Jun 2008 09:25:04 -0700
Reply-To:     "Terjeson, Mark" <Mterjeson@RUSSELL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Terjeson, Mark" <Mterjeson@RUSSELL.COM>
Subject:      Re: Any idea on how to insert blank lines after each id?
Comments: To: Judy <statpan@GMAIL.COM>
In-Reply-To:  A<16FD64291482A34F995D2AF14A5C932C044F50BB@MAIL002.prod.ds.russell.com>
Content-Type: text/plain; charset="us-ascii"

Additional: to dress out the missings, add:

option missing=' ';

Mark

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Terjeson, Mark Sent: Tuesday, June 17, 2008 9:12 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: Any idea on how to insert blank lines after each id?

Hi Judy,

Here is one crude approach:

data sample; input id A $ B $; cards; 1 a1 b1 1 a2 b2 2 a1 b1 2 a3 b3 10 a9 b3 10 a9 b2 ; run;

data result(drop=i); set sample; by id; output; if last.id then do; id=.; A=''; B=''; do i = 1 to 5; output; end; end; run;

Hope this is helpful.

Mark Terjeson Senior Programmer Analyst Investment Management & Research Russell Investments

Russell Investments Global Leaders in Multi-Manager Investing

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Judy Sent: Tuesday, June 17, 2008 8:46 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Any idea on how to insert blank lines after each id?

The original dataset id A B 1 a1 b1 1 a2 b2 2 a1 b1 2 a3 b3 ...... 10 a9 b3 10 a9 b2

I would like to insert 5 blank lines after each different ID to make it look like this: id A B 1 a1 b1 1 a2 b2

2 a1 b1 2 a3 b3

......

10 a9 b3 10 a9 b2

Thanks a lot, Judy


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