The SAS Output Delivery System and reporting techniques

Input data with DO statement.

Reply
N/A
Posts: 0

Input data with DO statement.

Hello,
The data is like this:
Group Score
1 5
1 9
1 6
2 3
2 7
2 8

I guess using do statement(or similar loop) in the data step would speed the input. I know for example in matlab how to do this, but what is the equivalent code in SAS?
gim
N/A
Posts: 0

Re: Input data with DO statement.

Posted in reply to deleted_user
Hi,
I got a solution of my own:
data test;
do group=1 to 2;
do j=1 to 3;
input score @;
output;
end;
end;
drop j;
datalines;
5 9 6 3 7 8
;

gim
N/A
Posts: 0

Re: Input data with DO statement.

Posted in reply to deleted_user
... and why do you think that this is better?
Ask a Question
Discussion stats
  • 2 replies
  • 138 views
  • 0 likes
  • 1 in conversation