| Date: | Mon, 31 Oct 2005 16:39:58 -0500 |
| Reply-To: | "Nick ." <ni14@MAIL.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | "Nick ." <ni14@MAIL.COM> |
| Subject: | SAS programming question/problem |
| Content-Type: | text/plain; charset="iso-8859-1" |
Hello,
I have a SAS (V8.2) data set with, say, 5 fields (in my data set it has like 500 fields) called VAR1, VAR2,..., VAR5.
I have an Excel data set that looks like this:
A B
VAR1 Age
VAR2 Income
VAR3 Gender
VAR4 Num_Accts
VAR5 Zip_Code
I need to go to my SAS data set above and replace the field names VAR1,...,VAR5 with Age, Income, Gender, Num_Accts, Zip_Code respectively. (A and B are the column headings in Excel sheet, not of importance, I guess.) Someone asked me why I need this. I need this for modeling. People need to know what VAR1, VAR2, VAR3, etc. mean.
NOTE: The crux of my question is how to AUTOMATE the above. If I had to go and use RENAME or do this in a data step using INPUT, I know that stuff, yes, I can do it. But it is a lot of typying (and lot's of wrrors)...500 inputs and long names. Very long names, lot's of typing. What if instead of 500 inputs I had 5,000 inputs? Say 50,000 inputs VAR1...VAR50000. Will I still sit there typying for 3 months? I was looking for an automated way to accomplish this task. Thanks as always.
NICK
--
___________________________________________________
Play 100s of games for FREE! http://games.mail.com/
|