|
Todd:
SAS (in)formats will give you somewhat similar results. RTFM for more
details on (in)formats, PROC FORMAT etc.. Note that you can specify a value
for 'other' as well when creating the format.
data in;
retain fmtname 'blah'
type 'i';
input start label 5.2 col1 ;
cards;
2003 0.03 0.0375
2004 0.00 0.02
2005 0.00 0.02
2006 0.00 0.02
2007 0.00 0.02
2008 0.00 0.02
2009 0.00 0.02
2010 0.00 0.02
2011 0.00 0.02
2012 0.00 0.02
2013 0.00 0.02
run;
proc format cntlin=in;
run;
data a;
format col1 5.2;
do year = 2003 to 2015;
col1 = input(year,blah.);
output;
end;
run;
proc print;
run;
-----Original Message-----
From: Todd A Goselin [mailto:tgoselin@YAHOO.COM]
Sent: Wednesday, November 26, 2003 1:31 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Vlookup feature in SAS?
Hello,
I have a dataset that looks like:
2003 0.03 0.0375
2004 0.00 0.02
2005 0.00 0.02
2006 0.00 0.02
2007 0.00 0.02
2008 0.00 0.02
2009 0.00 0.02
2010 0.00 0.02
2011 0.00 0.02
2012 0.00 0.02
2013 0.00 0.02;
All I want to do is use something like the Microsoft Excell
Vlookup function that uses a keyword (in this case a Year, and get the next
columns data.
Does anyone have an idea what to do? It looks like SAS does
not have a vlookup feature.
My goal is to have something scan the table above and get
the second column for a specific year.
Thanks,
Todd
---------------------------------
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
|