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 (March 2003, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 24 Mar 2003 12:52:29 -0700
Reply-To:     Jack Hamilton <JackHamilton@FIRSTHEALTH.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Jack Hamilton <JackHamilton@FIRSTHEALTH.COM>
Subject:      Re: Use variable twice in PROC REPORT
Comments: To: notawahoo@YAHOO.COM
Content-Type: text/plain; charset=us-ascii

Use a column alias. This code:

===== data test; input @1 region $1. @3 value; put (_all_) (=); cards; N 1 S 2 ;;;; run;

proc format; value $region 'N' = 'North' 'S' = 'South'; run;

proc report data=test nocenter nowindows;

column region region=region2 value;

define region / width=6; define region2 / format=$region. width=5;

run; =====

will produce this output:

===== regio region n value N North 1 S South 2


I should have set a width of 6 on region2 also.

-- Manager, Technical Development Metrics Department, First Health West Sacramento, California USA

>>> "Nancy Kay" <notawahoo@YAHOO.COM> 03/24/2003 11:35 AM >>> I want to summarize my data by Region and print a report showing both the Region code and the Region Description. The Region Description is determined by looking up the region code in a FORMAT, and it does not exist as a variable on the incoming dataset.

A Central Virginia 150 B Northern Virginia 27 C Other Virginia 71 D Other USA 4

How can I specify the two versions of Region in PROC REPORT, since they're actually the same variable?



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