首页 > 解决方案 > 吐出打开的程序中使用的数据源和库

问题描述

有没有办法提取 SAS EG 中打开的程序中使用的所有数据源和库?

我发现了以下我可以操作的内容,但不幸的是,由于 sas 的设置方式,我无法使用 Filename,而且我无法使用 Filename FTP。这里有什么想法吗?

   Filename inp "<path and name of the sas code/>";

   data temp;
   infile inp;
   input rec $100.;
   if index(lowcase(rec), "libname") ne 0 then output; /*check libraries */
   else if index(lowcase(rec),"filename") ne 0 then output; /*check input files*/
   else if index(lowcase(rec),"data") ne 0 and index(rec,".") ne 0 then output; /* to check the  
   permanent datasets */
   else if index(lowcase(rec),"merge") ne 0 and index(rec,".") ne o then output; /*check permanent 
   datasets used in merge*/
   run;

标签: sassas-macro

解决方案


推荐阅读