全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
4914 13
2012-05-10
Security No.Participants
1Servicer: 1st Financial Bank  USA,Indenture Trustee: Bank of New York Mellon (The)
2Indenture Trustee: Bank of New  York Mellon (The),Servicer: 1st Financial Bank USA
3Originator: 321 Henderson  Receivables Origination LLC,Seller: 321 Henderson Receivables Acquisition  LLC,Master Servicer: J.G. Wentworth Management Co. Inc.,Underwriter: Deutsche  Bank Securities Inc.,Indenture Trustee: Wilmington Trust Company ,Bond Counsel:  Sidley & Austin
4Seller: 321 Henderson  Receivables Acquisition LLC,Originator: 321 Henderson Receivables Origination  LLC,Owner Trustee: Deutsche Bank Trust Company Americas,Master Servicer: J.G.  Wentworth Management Co. Inc.,Underwriter: Deutsche Bank Securities Inc.,Indenture  Trustee: Wilmington Trust Company ,Bond Counsel: Sidley & Austin
5Underwriter: Citigroup Global Markets Inc.,Bond Counsel: Foley & Lardner,Servicer: Access Group Inc,Underwriter: UBS Financial Services, Inc.,Trustee: Deutsche Bank Trust Company Americas,Underwriter: KeyBanc Capital Markets,Indenture Trustee: Deutsche Bank Trust Company Americas,Servicer: Kentucky Hgr Ed Std Ln Corp,Originator: Access Group Inc


有上万个这样的证券及相关参与方的数据,现在我想要新建一系列column,把诸如originator,underwriter,indenture trustee这样数据的分门别类地列出来。还有一点麻烦的是有时一个类别的参与方不止一个,例如No.5证券中underwriter有三个,还不是连着的。求助大牛应该怎么处理呢?

有几个想法:1.substr和find一起用,把“originator:”“,”的位置挑出来,截取其中的内容,但怎么样使找到的逗号是“originator:“之后第一个出现的逗号呢?而且这之后同一格中要再有一个underwriter该怎么办。。。
2.按逗号把Participants中的内容全部打断,放到不同column中(不知能否实现),然后再循环在每个row中分别依次找originator,underwriter,indenture trustee,这样每个待检索的cell中只会有一个逗号。

求大牛指点迷津,不胜感激~~~
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2012-5-10 14:23:08
真是需要大牛才能解决的问题
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2012-5-10 14:25:06
liulinjun010 发表于 2012-5-10 14:23
真是需要大牛才能解决的问题
多谢来顶!
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2012-5-11 10:46:19
第二个思路可以用scan(source,n,dlm)函数实现, source是原始字符串,n 是第几个组分,dlm是分隔符。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2012-5-11 10:47:53
做一个do while 循环,把扫描出来的word赋值给临时字符串变量temp do while (temp ne "")
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2012-5-13 22:41:53
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哪里有问题了捏?
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

点击查看更多内容…
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群