Dear colleagues I have a data file with several variables each having multiple observations in one record. The dataline statement has 'car_type' 'car_color' afterwards three consecutive informations on 'mile' afterwards 'car_dirt' and again three consecutive informations on 'oil' my strategy was using '@' in order to hold the line and read the multiple observations in do-loops. The output example shows that only the first variable with multiple observations is read properly. what am I doing wrong? all the best Robert data new; input car $ color $ @; do i = 1 to 3; input miles @; output; end; input dirty $ @; do j = 1 to 3; input oil ; output; end; datalines; VW green 25 35 28 yes 0.25 0.35 0.28 bmw yellow 15 25 18 no 0.15 0.25 0.18 ; run; proc print; run; OUTPUT Beob. car color i miles dirty j oil 1 VW green 1 25 . . 2 VW green 2 35 . . 3 VW green 3 28 . . 4 VW green 4 28 yes 1 0.25 5 VW green 4 28 yes 2 .
... View more