Tag: sas functions

Next time, do your own homework

SAS programming is taught in schools all over the world, including in high schools.  Occasionally, I receive questions via my blog such as this one: Can somebody help me on this? Write a short DATA _NULL_ step to determine the largest integer you can store on your computer in 3, […]

SAS DIF function – Comparing previous records

The SAS DIF function is another useful tool for operating on previous records. Lets say you want to know the difference in the last year’s revenue and this year’s revenue. Here is the data: Year          Revenue 2001           10,000 2002          30,000 2003          60,000 2004          100,000 data revenue1; set revenue; Rev_increase=dif1(revenue); run; Year          Revenue         Rev_increase 2001           10,000         […]