|
When you say that GRADSTEM remains exactly the same, do you mean every
output record has the same value? What value does it end up with? Is
it a variable on the input data set?
Jack Clark
Research Analyst
Center for Health Program Development and Management
University of Maryland, Baltimore County
410-455-6256
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of E
Henderson
Sent: Friday, August 10, 2007 11:09 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Iterative Processing Issues
I'm trying to run the following code, but every time I execute it, I the
values of the variable I'm trying to create (gradstem) remain exactly
the
same. Any guidance would be appreciated.
data nlsy79_stemtrans_v3_ba;
set nlsy79_stemtrans_v2_ba;
array enrollyear{12} enrollyear1-enrollyear12;
array enrolltype{12} enrolltype1-enrolltype12;
array attstat{12} attstat1-attstat12;
array majorcat{12} majorcat1-majorcat12;
/*
array jobord{13} jobord1-jobord13;
array currstat{13} currstat1-currstat13;
array hoursjob{13} hoursjob1-hoursjob13;
array yearearn{13} yearearn1-yearearn13;
array occcatjob{13} occcatjob1-occcatjob13;
*/
gradstem=0;
do i=1 to i=12 until (enrollyear{i}=outyear);
if attstat{i}=1 then do;
if 1<=(majorcat{i})<=4 and (enrolltype{i})=1 then gradstem=1;/*Grad FT
STEM*/
else if 5<=(majorcat{i})<=9 and (enrolltype{i})=1 then gradstem=2;/*Grad
FT
Non STEM*/
else if 1<=(majorcat{i})<=4 and (enrolltype{i})=2 then
gradstem=3;/*Other
FT STEM*/
else if 5<=(majorcat{i})<=9 and (enrolltype{i})=2 then
gradstem=4;/*Other
FT Non STEM*/
end;
end;
drop i;
run;
|