I also think you can use PROC IMPORT, but if you need to do it in the DATA step, you can do that too.
If your csv data is delimited with comma, you can use infile with dsd option.
like this.
Data Iris;
Infile datalines dsd;
Input sepallen sepalwid petallen petalwid species @@;
Format species specname.;
Label sepallen='Sepal Length in mm.'
sepalwid='Sepal Width in mm.'
petallen='Petal Length in mm.'
petalwid='Petal Width in mm.';
Datalines;
/* copy and paste raw data like below. */
50,33,14,02,1,64,28,56,22,3,65,28,46,15,2,67,31,56,24,3
...
;
run;
If your data is delimited with space like you post, no infile statement needed.
... View more