```Date: Tue, 19 Mar 2002 12:57:27 -0600 Reply-To: Thomas Allen Schmitt Sender: "SAS(r) Discussion" From: Thomas Allen Schmitt Subject: Put Content-Type: TEXT/PLAIN; charset=US-ASCII Hi All! could someone give me an idea on how to write the program correctly below for the three variables. When I use just one variable the data files come out correct, but when I add a second or third the data doesn't come out exactly correct. I've tested each separately and they all work but I can't get them to output correctly together. Thanks! Tom do i = 1 to 2; do t = 1 to 12; do z = 1 to 5; */ calculations for var /*; end; file 'first'; if t = 1 then put @1 var1 @; else if t = 2 then put @11 var1 @; else if t = 3 then put @21 var1 @; else if t = 4 then put @31 var1 @; else if t = 5 then put @41 var1 @; else if t = 6 then put @51 var1; else if t = 7 then put @1 var1 @; else if t = 8 then put @11 var1 @; else if t = 9 then put @21 var1 @; else if t = 10 then put @31 var1 @; else if t = 11 then put @41 var1 @; else if t = 12 then put @51 var1 @; file 'second'; if t = 1 then put @1 var2 @; else if t = 2 then put @11 var2 @; else if t = 3 then put @21 var2 @; else if t = 4 then put @31 var2 @; else if t = 5 then put @41 var2 @; else if t = 6 then put @51 var2; else if t = 7 then put @1 var2 @; else if t = 8 then put @11 var2 @; else if t = 9 then put @21 var2 @; else if t = 10 then put @31 var2 @; else if t = 11 then put @41 var2 @; else if t = 12 then put @51 var2 @; file 'third'; if t = 1 then put @1 var3 @; else if t = 2 then put @11 var3 @; else if t = 3 then put @21 var3 @; else if t = 4 then put @31 var3 @; else if t = 5 then put @41 var3 @; else if t = 6 then put @51 var3; else if t = 7 then put @1 var3 @; else if t = 8 then put @11 var3 @; else if t = 9 then put @21 var3 @; else if t = 10 then put @31 var3 @; else if t = 11 then put @41 var3 @; else if t = 12 then put @51 var3 @; end; put; end; run ```

Back to: Top of message | Previous page | Main SAS-L page