|
|
5#

楼主 |
发表于 2009-12-12 10:33:37
|
只看该作者
Re: 关于条件退出MACRO的问题
你再试试下面的程序,应该能够解决你的问题,标红为新增加的内容。
%macro zhutou(user=, dir=);
filename id pipe "groups &user";
data groups;
infile id;
length groups $ 100;
input;
groups = substr(_infile_, find(_infile_, ':')+1);
call symputx('groups', cats('"', tranwrd(trim(groups), ' ', '","'), '"'));
[color=#FF0000:3c3ni57z]%if &groups='admin' %then %do;
%goto exitmacro;
%end;[/color:3c3ni57z]filename ls pipe "ls -lR &dir";
data permission;
infile ls;
length permission $ 10 owner group $ 8 Path $ 300 parent $ 300;
run;
[color=#FF0000:3c3ni57z]%exitmacto:[/color:3c3ni57z]
%mend;[/quote] |
|