Hello team,
This is my code, it runs successfully; it gives me only a line. How to view the increase year by year:
data salyr; input salary year; cards; 134 2019 run; data increaseit; set salyr; do until (salary gt 1000); salary = salary + salary * 0.06; year = year + 1; end; output; Run;
Thanks,
Blue Blue
Here are a few ways, the method depends on what you're trying to do next:
@GN0001 wrote:
Hello team,
This is my code, it runs successfully; it gives me only a line. How to view the increase year by year:
data salyr; input salary year; cards; 134 2019 run; data increaseit; set salyr; do until (salary gt 1000); salary = salary + salary * 0.06; year = year + 1; end; output; Run;
Thanks,
Blue Blue
Here are a few ways, the method depends on what you're trying to do next:
@GN0001 wrote:
Hello team,
This is my code, it runs successfully; it gives me only a line. How to view the increase year by year:
data salyr; input salary year; cards; 134 2019 run; data increaseit; set salyr; do until (salary gt 1000); salary = salary + salary * 0.06; year = year + 1; end; output; Run;
Thanks,
Blue Blue
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!
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.