Version 9.4 with no access to library SAS/STATS or IML The following source code is a condensed version of 2 datasets. Actual data is longer with several decimal places of accuracy. data work.have1;
input a b c;
datalines;
5 6 7
8 9 4
3 2 3
;
run;
data work.have2;
input a b c;
datalines;
4 5 6
2 3 4
9 7 2
;
run; Desired output is product of corresponding elements: a b c 20 30 42 16 27 16 27 14 6 The following is the first attempt at coding. It compiles without errors, but contains 6 rows and 3 columns whereas the datasets are appended to one another: proc sql;
create table work.product1 as
select * from work.have1
outer union corr
select * from work.have2;
quit; The following is the second attempt at coding. It compiles without errors, but does not produce the desired results: proc fcmp;
array h1[3,3] /nosymbols;
array h2[3,3] /nosymbols;
array product[3,3] ;
re=read_array('work.have1',h1);
re=read_array('work.have2',h2);
call mult(h1,h2,product);
rc=write_array('work.product',product);
run; Thank you in advance for your support, insight, and willingness to assist. Sincerely, Jane
... View more