[prev in list] [next in list] [prev in thread] [next in thread]
List: sas-l
Subject: Re: Proc Print ID and BY variables
From: "Abelson, Robert" <RobertA () MOCR ! OAPI ! COM>
Date: 1998-06-30 15:38:01
[Download RAW message or body]
Alan,
I can't get it to work using PROC PRINT, but PROC REPORT will do it:
proc report data=a nowindows;
column centre patient illness started stopped;
define centre / group;
define patient / group;
define illness / display width=8;
define started / display width=8;
define stopped / display width=8;
run;
Hope this helps.
Bob Abelson
Otsuka America Pharmaceuticals
"All lies are told with a straight face. It is truth that's said with a
dismissive giggle." - P.J. O'Rourke
> -----Original Message-----
> From: Cooper, Alan [SMTP:ACooper@SCHERING.CO.UK]
> Sent: Tuesday, June 30, 1998 9:05 AM
> To: SAS-L@UGA.CC.UGA.EDU
> Subject: Proc Print ID and BY variables
>
> Hello All,
>
> I'm trying to get the following data:
>
> Centre Patient Illness Started Stopped
>
> 1 1 A 01/01/98 02/01/98
> 1 1 B 02/02/98 03/03/98
> 1 2 C 01/01/98 02/01/98
> 1 2 D 02/02/98 03/03/98
> 2 3 E 01/01/98 02/01/98
> 2 3 F 02/02/98 03/03/98
> 2 4 G 01/01/98 02/01/98
> 2 4 H 02/02/98 03/03/98
>
> in to a report in the following format.
>
> Centre Patient Illness Started Stopped
>
> 1 1 A 01/01/98 02/01/98
> B 02/02/98 03/03/98
> 2 C 01/01/98 02/01/98
> D 02/02/98 03/03/98
> 2 3 E 01/01/98 02/01/98
> F 02/02/98 03/03/98
> 4 G 01/01/98 02/01/98
> H 02/02/98 03/03/98
>
> You can't just use the same ID and BY variables (in this case Centre
> Patient) as it puts the centre number in for each patient - I only want
> it when the centre number changes. Is there an easy way of doing this by
> some little gem in proc print ? Can any one out there help. ? Why does
> my boss have to be so awkward and want it like this anyway ?
> If you can help it would be v.v.v.v appreciated.
>
> Alan Cooper
> Biometrics Dept, Schering Health Care
>
> I've used up all my sick days I'll have to call in dead.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic