- data sample_wide;
- id = 1;
- product = 'A';
- date1 = '20Jan2013'd; action1 = 'Buy';
- date2= date1+1; action2 = 'Sale ';
- date3 = date2+2; action3 = 'keep ';
- date4 = date3+3; action4 = 'increase ';
- output; output; output;
- format date1-date4 yymmdd10. action1-action4 $10.;
- run;
- data sample_long;
- array d{4} date1-date4;
- array a{4} $10. action1-action4;
- set sample_wide;
- do i = 1 to dim(d);
- date = d[i];
- action = a[i];
- output;
- end;
- keep id product date action;
- format date yymmdd10.;
- run;


雷达卡





京公网安备 11010802022788号







