@Tom wrote: Why not use parmcards instead. options parmcards=mycards;
filename mycards temp;
parmcards4;
Alfred M 14 69 112.5
Alice F 13 56.5 84
Barbara F 13 65.3 98
Carol F 14 62.8 102.5
;;;; Now later in your DS2 code you can use INFILE MYCARDS. I've tried your method and it says a "parsing failed" issue, but I've found another way that can be used as a reference if you need it proc ds2;
data r;
method run();
infile mycard;
end;
enddata;
run;
quit; The right way is next code proc ds2;
data s / overwrite=yes;
drop j;
declare varchar(16) ds2_array[2,5];
declare double ds2_arrayo[5];
declare varchar(16) ds2_array1 ds2_array2 ;
dcl double ds2_array3 j;
method run();
ds2_array:=(
'parmcard','Alfred','Alice','Barbara ','Carol ','f','f','f','f','f');
ds2_arrayo:=(1.1,2.1,3.1,4.1,5.1);
do j=1 to dim(ds2_array,2); ds2_array1=ds2_array[1,j];
ds2_array2=ds2_array[2,j];
ds2_array3=ds2_arrayo[j];
output; end;
end;
enddata;
run;
quit;
... View more