0
votes

I am having trouble with a .txt data set that is separated by spaces. It is in list input format and I want to separate it into three columns.

I've tried using row pointers, column pointers, and other methods within the input statement. I've been searching online and I think an array would work in this situation but I'm not sure how to do that (I'm new to SAS).

1 1 2 2 1 1 3 1 2 4 0 3 5 1 3 6 1 2 7 0 3 8 1 3 9 0 1 10 0 2 11 1 1 

I want the data to be in columns:

ID Group Time. 

1 .  1 .   2

2 .  1 .   1

3 .  1 .   2

The id numbers go up to 90

1

1 Answers

0
votes

Use the held line input modifier @@:

filename mydata "whatever.txt";
data want;
  infile mydata;
  input id group time @@;
run;