您的位置:首页 > 大数据 > 人工智能

获得sas程序的名称,及提取包含特定字段的行 Get then names of some programs and get rows which contain specify fields

2006-12-13 13:50 543 查看

filename fn "C:/Documents and Settings/yxg/My Documentsmeeting/*.SAS";


data t(keep =str name);


 length sd $255. ;


 length name $255.;


   infile fn filename=sd ;


    *注意这里的赋值


   name=sd;


   name=substr(compress(name),length(compress(name))-10);


 input str $255. @@;


  re = prxparse("/a1/");


  re2 = prxparse("/a2/");


  re3 = prxparse("/a3/");




  dofind = 0;  /**//*用于查找多个源*/


 if prxmatch(re, str) then do;


  output;


 end;


 if prxmatch(re2, str) then do;


  output;


 end;


 if prxmatch(re3, str) then do;


  output;


 end;


run; 



内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  output c
相关文章推荐