EM Help中有个例子,可以用的,根据这个例子调整下自己的数据吧
注意项目
/*
CUSTOMER: ID role
PRODUCT: target role
TIME: rejected role.
In the Data Source Wizard — Data Source Attributes window, change the data source role from Raw to Transaction.
*/
libname assocs "e:\temp";
DATA assocs.test2;
input customer time item1 $ item2 $ item3 $
item4 $;
datalines;
1 1 herring corned_b olives .
1 2 ham turkey bourbon ice_cream
2 1 baquette soda . .
2 2 herring cracker heineken olives
2 3 corned_b . . .
3 1 avocado cracker artichok heineken
3 2 ham turkey sardines .
;
run;
PROC TRANSPOSE
data=assocs.test2
out=assocs.seq2(rename=(col1=product)
drop=_name_
where=(product is not missing));
var item1-item4;
by customer time;
run;