Here the fixed "Run the following DATA step to create a SAS data set called ABC_CORP." There had been some colons instead of semicolons in the syntax.
data ABC_CORP;
Do SUBJ = 1 to 10;
DOB = INT (RANUNI(1234)*15000);
VISIT_DATE = INT (RANUNI (0)*1000) + '01JAN2000'D;
OUTPUT;
END;
FORMAT DOB VISIT_DATE DATE9.;
stop;
RUN;
I'm now really hesitant to also post all the code for "create a new dataset...". This sounds very much like an exercise so what value does it have to just throw the full solution at you? More than happy to help when you struggle - but that requires you to first post some code explaining what's not working.
This discussion and the links provided in the solution should give you guidance how to calculate the different ages.
... View more