SAS中文论坛

 找回密码
 立即注册

扫一扫,访问微社区

12
返回列表 发新帖
楼主: shiyiming
打印 上一主题 下一主题

新药统计中定量指标的SAS宏程序

[复制链接]

49

主题

76

帖子

1462

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1462
11#
 楼主| 发表于 2007-9-2 15:59:44 | 只看该作者

Re: 新药统计中定量指标的SAS宏程序

你没有这么无聊吧,看看本板块已经贴了多少程序出来.
回复 支持 反对

使用道具 举报

49

主题

76

帖子

1462

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1462
12#
 楼主| 发表于 2007-9-2 17:41:33 | 只看该作者

Re: 新药统计中定量指标的SAS宏程序

我没说本版没贴出不少的程序啊?怎么扯到那里去了?能看到这样的版块我很高兴的啊!不过您作为版主总该有点魄力吧!我知道在国外这些资料早已经不是密码了。我看过一个网站,里面关于这方面的资料都是公开的,只是那个库太大,我暂时没有去找我要的东西就发现这个中文论坛了,本来以为我的那个问题可对于你们这些高手是小CASE,可以在这里得到解决的,那collen版主已经说了这对于你是个秘密,我也就不强求什么了!不过还是希望能把这个版块办的越办越好!顺便送个宏给大家
%macro verify(text,ref);
%local pos error;
%let error=0;
%if not %length(&text) %then %do;
  %put ERROR: (verify) No text string supplied for verify to act on.;
  %let error=1;
%end;
%if not %length(&ref) %then %do;
  %put ERROR: (verify) No reference string supplied for verify to use.;
  %let error=1;
%end;

%if &error %then %goto error;

%do pos=1 %to %length(&text);
  %if NOT %index(&ref,%qsubstr(&text,&pos,1)) %then %goto gotit;
%end;

%gotit:
%if &pos GT %length(&text) %then 0;
%else &pos;

%goto skip;
%error: %put ERROR: (verify) Leaving verify macro due to error(s) listed.;
%skip:
%mend;


Purpose   : Function-style macro to return the position of the first character  in a string that does not match any character in a reference string.
回复 支持 反对

使用道具 举报

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

本版积分规则

QQ|小黑屋|手机版|Archiver|SAS中文论坛  

GMT+8, 2026-2-4 08:51 , Processed in 0.085190 second(s), 20 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表