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 (November 2006, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 6 Nov 2006 14:42:32 +0000
Reply-To:     toby dunn <tobydunn@HOTMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         toby dunn <tobydunn@HOTMAIL.COM>
Subject:      Re: Get variables names using DSID
Comments: To: sumanta24@GMAIL.COM
In-Reply-To:  <1162814644.269728.59710@k70g2000cwa.googlegroups.com>
Content-Type: text/plain; format=flowed

Sum ,

MaxNum = Max( Of Var1-Var56 ) ;

Toby Dunn

You never know what is enough, until you know what is more than enough. ~William Blake, Proverbs of Hell

When the student is ready, the master appears. ~Buddhist Proverb

Only that in you which is me can hear what I'm saying. ~Baba Ram Dass

From: SUM <sumanta24@GMAIL.COM> Reply-To: SUM <sumanta24@GMAIL.COM> To: SAS-L@LISTSERV.UGA.EDU Subject: Get variables names using DSID Date: Mon, 6 Nov 2006 04:04:04 -0800

Hi All,

I have a data set of 56 variables and each variable has 400 observations. Now i create a variable for each observation which gives maximum of all 56 variables.

VAR1 VAR2 VAR3 VAR56 MAX VAR

OBS1 5 6 10 35 35 VAR56 OBS2 OBS3

OBS400

Now i want to create another variable which will give me for each observation which is the particulare variable giving maximum value. e.g. for the first observation it's VAR56. How can i create this? Using if-else condition it is fairly easy. But can you help me for a short procedure? And also suppose these 56 variables are different names (e.g. stocks).

Thanks in advance.

Sumanta.

_________________________________________________________________ All-in-one security and maintenance for your PC. Get a free 90-day trial! http://clk.atdmt.com/MSN/go/msnnkwlo0050000002msn/direct/01/?href=http://www.windowsonecare.com/?sc_cid=msn_hotmail


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