using loop function, I like to put variables in different columns in condition to the other variable in the data. I have trouble writing right loop statement because relocation variables keep going to the next row. Can someone point out what I did not get? I want my variables aligh like this : ft @10 m1 @30 m2 @31 m3 @32 m4 @34 o2 @35 o5 @36
data fttryone;
input ft m1 o2 m3 m4 o5;
datalines;
1 2 3 4 5 6
2 7 8 9 1 1
3 1 3 4 5 2
4 6 7 8 9 2
;
run;
data null;
set fttryone;
file 'C:\fttry18.txt';
put @10 ft
@30 M1
@31 M3
@32 M4
do i=0 to 4;
j=i*2;
if ft=i then
put @35+j o2
put @36+j o5;
run;