My bad, I thought the objective was different formats on each row...
Obs
Obs
small
medium
large
elem
middle
high
all
1
1
I
II
III
I
0002
0003
0004
4
1
one
two
three
one
two
three
four
data row1;
infile datalines dsd truncover;
input small medium large elem middle high all ;
format small--elem roman6. middle--all z4. ;
datalines;
1,2,3,1,2,3,4
;
run;
data row2;
infile datalines dsd truncover;
input small medium large elem middle high all ;
format _all_ words. ;
datalines;
1,2,3,1,2,3,4
;
run;
ods csv file='c:\temp\schools.csv';
proc print data=row1;
run;
proc print data=row2;
run;
ods csv close;
proc import datafile ='c:\temp\schools.csv' dbms=csv out=stacked replace;
getnames=yes;
run;
proc print data=stacked;
where obs = 1 ;
run;
... View more