Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/vba/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sas 吐出开放程序中使用的数据源和库_Sas_Sas Macro - Fatal编程技术网

Sas 吐出开放程序中使用的数据源和库

Sas 吐出开放程序中使用的数据源和库,sas,sas-macro,Sas,Sas Macro,有没有办法提取SAS EG中开放程序中使用的所有数据源和库 我发现了以下我可以操作的内容,但不幸的是我无法使用文件名,因为sas是如何设置的,并且我无法使用文件名FTP。有什么想法吗 Filename inp "<path and name of the sas code/>"; data temp; infile inp; input rec $100.; if index(lowcase(rec), "libname&

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

我发现了以下我可以操作的内容,但不幸的是我无法使用文件名,因为sas是如何设置的,并且我无法使用文件名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;
Filename inp”“;
数据温度;
infle-inp;
输入rec$100。;
如果索引(lowcase(rec),“libname”)为0,则输出/*检查库*/
否则如果索引(lowcase(rec),“filename”)为0,则输出/*检查输入文件*/
否则,如果索引(lowcase(rec),“data”)ne 0和索引(rec,“.”)ne 0,则输出;/*检查
永久数据集*/
否则,如果索引(lowcase(rec),“merge”)ne 0和索引(rec,“.”)ne o,则输出/*永久支票
合并中使用的数据集*/
跑

查看PROC SCAPROC,但它确实需要您运行该流程。如果您有任何宏代码和/或生成的代码,则该代码将不起作用。它根本不够健壮,无法捕捉到任何东西。这太棒了。非常感谢。您知道是否可以将Proc Scaproc导出到表而不是文件中吗?e、 把它分配到我的一个图书馆的一张桌子上?我让它工作了。这太棒了!非常感谢你。我遇到了马特·贝克尔,它成功了。