楼主: penfychou
1278 2

[问答] 用sas分离文本,求大神解答。题如下: [推广有奖]

  • 0关注
  • 0粉丝

等待验证会员

小学生

64%

还不是VIP/贵宾

-

威望
0
论坛币
10 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
53 点
帖子
3
精华
0
在线时间
10 小时
注册时间
2016-9-29
最后登录
2020-5-27

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
please write a SAS program to separate the text below:

One meets its destiny on the road he takes to avoid it. Your mind is like this water, my friend, when it is agitated, it becomes difficult to see, but if you allow it to settle, the answer becomes clear. Yesterday is history Tomorrow is a mystery. But today is a gift. That is why it’s called the present (the gift). Hope is a good thing, maybe the best of things, and no good thing ever dies.

Require 1: the length of each fragment can’t exceed 50;
Require 2: the word can’t be truncated.
二维码

扫码加我 拉你入群

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

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

关键词:Difficult yesterday truncated separate Tomorrow

沙发
wwang111 发表于 2017-7-24 14:49:24 |只看作者 |坛友微信交流群
data wanted;
set text;
_text=text;
array txt[*] $50 text1-text10;
i=1;
do until(_text="");
loc1=anyspace(_text,-50);
loc2=anypunct(_text,-50);
loc=max(loc1,loc2);
if loc=0 then loc=50;
txt[i]=left(substr(_text,1,loc));
_text=strip(substr(_text,loc+1));
i+1;
end;
keep text:;
run;
已有 1 人评分论坛币 学术水平 热心指数 信用等级 收起 理由
客初 + 20 + 3 + 3 + 3 热心帮助其他会员

总评分: 论坛币 + 20  学术水平 + 3  热心指数 + 3  信用等级 + 3   查看全部评分

使用道具

藤椅
penfychou 发表于 2017-7-24 15:54:26 |只看作者 |坛友微信交流群
wwang111 发表于 2017-7-24 14:49
data wanted;
set text;
_text=text;
非常感谢

使用道具

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-4-27 10:32