Hi guys
Good Morning
using do loops i want to create each observation as one dataset with sashelp.class library
it is a interview question
Correct answer: you don't do it, it is an unnecessary waste of time.
We have dealt with this stupid interview question several times in the last few days, who comes up with such crazy ideas?
Another way to look at these types of dumb questions is would I want to work for such an employer?
Since I'm already on the other side of the table (I recently was responsible for selecting my replacement when I retire), I can positively state that this kind of question would never be part of the interview. I do NOT want to scare the bright candidates away!
I wouldn't ask such a question in an interview but actually how a candidate responds tells you a lot - i.e. are they confident enough in an interview situation to question WHY someone would want to do this?
It also gives you an indication about real SAS experience/understanding of someone - i.e. that you can't create SAS tables during execution time except via the hash output method.
A SAS data step has an implied do-loop, you don't actually code it, but its in there.
@BrahmanandaRao wrote:
Hi guys
Good Morning
using do loops i want to create each observation as one dataset with sashelp.class library
it is a interview question
My $0.02
Putting anything in the SASHELP library is poor practice. Your next SAS update or reinstall if needed is likely to remove stuff. I can't tell if that was part of your question or not but incomplete questions get incomplete or possibly off topic answers.
I can see creating report documents of one observation per report but that would not require separate datasets. IMHO multiple reports from one set are easier than multiple reports from multiple data sets.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.