data work.roth_ira; start = 1000; do year = 1 to 30; savings + 5000; do month = 1 to 12; int = savings * (.05/12); savings + int; end; output;
84. How many variables/observations will come from the below program? Thank you!
the code @jc3992 has is incorrect;
you have unclosed do block.
if the code was as this
data work.roth_ira;
start = 1000;
do year = 1 to 30; savings + 5000;
do month = 1 to 12;
int = savings * (.05/12);
savings + int;
end;
output;
end;
run;
there would be 30 output records
if the code had the end to the do loop before the output like this
data work.roth_ira;
start = 1000;
do year = 1 to 30; savings + 5000;
do month = 1 to 12;
int = savings * (.05/12);
savings + int;
end;
end;
output;
run;
there would be 1 record output
30 & 5?
If I'm wrong, i blame it on being tipsy
Btw #84 , where did you get this from?
I forgot. Maybe the 95 former questions I guess
Those type of questions are usually from a test dump. The exams have been recently redesigned though and I don't think the old materials will supply coverage for the current exams.
@novinosrin wrote:
Btw #84 , where did you get this from?
Thank you @Reeza,So are you sure no more dumps circling around. True merit system has been restored or put into effect.
Ok some relevant fun or laughter
I've met some Advanced Certified folks who would ask questions like how to reorder variables in a SAS data set or seek help with "proc MERGE" ;). Go figure...
That's hilarious 🙂
EDIT: I assumed dumps meaning leaked questions, but if the meaning is something to do with practice papers, I beg pardon
the code @jc3992 has is incorrect;
you have unclosed do block.
if the code was as this
data work.roth_ira;
start = 1000;
do year = 1 to 30; savings + 5000;
do month = 1 to 12;
int = savings * (.05/12);
savings + int;
end;
output;
end;
run;
there would be 30 output records
if the code had the end to the do loop before the output like this
data work.roth_ira;
start = 1000;
do year = 1 to 30; savings + 5000;
do month = 1 to 12;
int = savings * (.05/12);
savings + int;
end;
end;
output;
run;
there would be 1 record output
Run the code and see.
Bonus points for seeing the syntax errors before running the code. (especially with a poor code layout style)
And actually without seeing the end of a data step one could make an argument for "can't tell" as there could be more code before a not-shown run statement that affects the number of variables.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.