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.
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.
Ready to level-up your skills? Choose your own adventure.