Date: Wed, 11 Nov 2009 10:16:05 -0800
Reply-To: SAS_learner <proccontents@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: SAS_learner <proccontents@GMAIL.COM>
Subject: Base sas certification question (Found somewhere )
Content-Type: text/plain; charset=windows-1252
Base sas certification question
Flat file structure is as below
1----5----10
dan 23 45
bob 44 50
sue 30 80
mam 40 50
The following code is submitted.
data temp;
infile ‘file specification’;
input x $ 1-3;
if x='sue' then input age 5-6;
else input height 8-9;
run;
what would be the value of variable AGE in the dataset TEMP when variable X
has the value ‘Sue’?
a) 30
b) 44
c) 40
d) 55
Ans: c
can anyone plz explain me why the ans is 40. Thanks in advance.
Thanks
SL