option nodate pagesize=60 linesize=80;
data a;
input city :$8. distr :$8. bk :$20. gj :$100.;
cards;
上海  宝山  大华板块            7号线,737,738,11号线,58,78
上海  嘉定  嘉定新城板块        3号线,嘉环二线,11号线
;
run;
data b;
  set a;
  gj1=substr(gj,1,index(gj,',')-1);
  mid1=substr(gj,index(gj,',')+1);
  gj2=substr(mid1,1,index(mid1,',')-1);
  mid2=substr(mid1,index(mid1,',')+1);
  gj3=substr(mid2,1,index(mid2,',')-1);
  mid3=substr(mid2,index(mid2,',')+1);
   gj4=substr(mid3,1,index(mid3,',')-1);
  mid4=substr(mid3,index(mid3,',')+1);
   gj5=substr(mid4,1,index(mid4,',')-1);
  mid5=substr(mid4,index(mid4,',')+1);
   gj6=substr(mid5,1,index(mid5,',')-1);
  mid6=substr(mid5,index(mid5,',')+1);
  drop gj mid1 mid2 mid3 mid4 mid5 mid6;
run;
proc print data=b;
run;
我是来学习的,笨办法,打个酱油