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 2004, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 26 Oct 2004 13:21:32 -0400
Reply-To:     "Braten, Michael (Exchange)" <mbraten@BEAR.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Braten, Michael (Exchange)" <mbraten@BEAR.COM>
Subject:      Re: treat a computed variable in proc report like an order
Comments: To: Todd Case <>
Content-Type: text/plain; charset="us-ascii"

To answer your most immediate question, you may want to consider the use of PROC SQL to add a variable AGESSEXR of length 25 char. Then, an SQL update tothe dataset to populate the variable. About 3 lines of code.

I would like to draw your attention to age and sex which you have declared as 'order noprint'. I am not sure that the results will be to your liking. ORDER and Noprint variables are required to be the first on the Column statement. As the leftmost ( or first mentioned) they will not appear on the page. Perhaps the rules as I first learned them have since changed.

column age sex ('__' ' ' id race agesexr);

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Todd Case Sent: Tuesday, October 26, 2004 12:54 PM To: SAS-L@LISTSERV.UGA.EDU Subject: treat a computed variable in proc report like an order variable

Proc report: Multiple obs. exist for 'ID' and I want computed variable 'AGESEXR' to show only once. In the problem below I'm still getting the '/' characters (used to delimit concatenated variables) in subsequent observations... Any ideas W/OUT GOING BACK TO THE DATA STEP?

proc report data=x; column ('__' ' ' id age sex race agesexr);

define ID / order order=data left 'Center/~Screen No.' width=10; define age / order noprint; define sex / order noprint; define race / order noprint; define AGESEXR / computed 'Age/Sex/Race' width=12;

compute agesexr / character length=25; agesexr =compress(age||'/'||substr(put(sex,sexf.),1,1)||'/'||put (race,racef.)); endcomp; run ;

*********************************************************************** Bear Stearns is not responsible for any recommendation, solicitation, offer or agreement or any information about any transaction, customer account or account activity contained in this communication. ***********************************************************************

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