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 (December 2004, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Mon, 20 Dec 2004 08:44:54 -0800
Reply-To:   "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Subject:   Re: Help with Datastep..
Comments:   To: "Sridhar, Kumar" <nsridhar@MEDAREX.COM>
Content-Type:   text/plain; charset="iso-8859-1"

Kumar -

Try composing your note in plain text before you post it. It isn't very readable the way it appears, your tables were expanded to columns and your code is double spaced.

Paul Choate DDS Data Extraction (916) 654-2160

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Sridhar, Kumar Sent: Monday, December 20, 2004 8:35 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Help with Datastep..

Hi All:

Let me explain what I am trying to do before asking all of you how to do it. The dataset has observations that currently look like so:

Cchem

Vtid

Val so

n

Mean

SD

Max

Median

Min

Creatinine (µmol/L)

Screening

Value 1

17

66.2

14.5

97.0

62.0

44.0

Infusion

Value 1

17

66.2

14.5

97.0

62.0

44.0

Change 2

17

7.8

11.8

27.0

8.0

-18.0

But I would like them to like so:

Cchem

Vtid

Val so

n

Mean

SD

Max

Median

Min

Creatinine (µmol/L)

Screening

Value 1

17

66.2

14.5

97.0

62.0

44.0

Infusion

Value 1

17

66.2

14.5

97.0

62.0

44.0

Change 2

17

7.8

11.8

27.0

8.0

-18.0

Here's the code that I wrote (could somebody take a look at this and tell me where all I am going wrong).

proc sort data=u3;

by chemseq vtid so ;

run;

data new(drop=chemseq siunit);

set u2 u3;

by chemseq vtid so;

cchem=trim(left(put(chemseq,chem.)))||' ('||trim(left(siunit))||')';

pageit=int((_n_-1)/30);

if last.chemseq and last.vtid and last.so then do;

cchem=' ';

vtid=' ';

val=' ';

n=' ';

mean=' ';

std=' ';

min=' ';

median=' ';

max=' ';

so=' ';

end;

run;

Thanks and regards

Kumar


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