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.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.