I have a SAS dataset created from Proc Freq procedure and transposed. Below is the layout
E.g. Proc Freq;
Tables Sex*year;
Where year ge 2005 and year le 2007;
Run;
Present Output after transposing by sex
Sex Cnt2005 Cnt2006 Cnt2007 Pct2005 Pct2006 Pct2007
Male
Female
Problem: I need to repeat the analysis for other set of years as needed. E.g. instead of 2005-2007 I may need to use 2000 to 2005 in where statement. How do I modify VAR statement in Proc Print
In other words how do I modify the below statement without literally changing them in several proc print statement
VAR sex cnt2005 pct2005 cnt2006 pct2006 cnt2007 pct2007;
Thanks.