Hello,
why the answer is 8, I think is 3.
can some solve my problem, thanks.
@teddyyu1622 Please mark the question as solved once you've received a solution that works for you. Please select the correct solution and choose that as the answer.
obs var1 results 1 A ->output because "if statemens" is true 2 A ->output because "if statemens" is true 3 B 4 C 5 A ->output because "if statemens" is true
and the last output statement output all the obs.
@teddyyu1622 Please mark the question as solved once you've received a solution that works for you. Please select the correct solution and choose that as the answer.
I would suggest making the data set and running the code to see the results.
Work.one gets 3 records from the first conditional Output.
Then OUTPUT writes records to both output sets unconditionally, so that is 5 records written to both.
Result: 8 records.
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.