hcydlee 发表于 2012-5-11 10:47 
做一个do while 循环,把扫描出来的word赋值给临时字符串变量temp do while (temp ne "")
多谢你的回答!
大牛,你帮我看看下面的
data Security1;
set Security;
if index(Participants,'Originator')>0 then do;
temp=substr(Participants, find(Participants,'Originator:')+12);
Originator=substr(temp,1,find(temp,',')-1);
do while (index(temp,'Originator:')>0);
temp=substr(temp,find(temp,'Originator:')+12);
Originator=Originator||','||substr(temp,1,find(temp,',')-1);
end;
end;
else Originator='';
drop temp;
run;
这个跑出来Originator栏里只有每个security的第一个Originator,后面还有其他的originator的都没有截到,桑心了... code哪里有问题了捏?