如何在SAS Enterprise Guide中列出所有可用的用户定义宏?

Atl*_*as7 4 sas enterprise-guide

在我的主要代码中说我有这个代码块:

%macros hi5;
 %put hi five;
%mend;

%macros helloworld;
  %put hello world;
%mend;
Run Code Online (Sandbox Code Playgroud)

在SAS Enterprise Guide中,我如何显示这样的内容?(通过日志或通过SAS表)

These are the user defined user macros:

hi5
hello world
Run Code Online (Sandbox Code Playgroud)

(目的是让用户能够知道他们已经可以使用哪些宏).

注意:%put _ALL_唯一列出所有宏变量,而不是宏(例如用%macros and %mend.构建.)

Joe*_*Joe 7

你可以通过PROC CATALOG或通过dictionary.catalogs.即使您不知道它们存储在何处,后者也会起作用.

proc sql;
  select * 
    from dictionary.catalogs
    where objtype='MACRO';
quit;
Run Code Online (Sandbox Code Playgroud)

这将包括SASHELP您可以排除使用的预定义宏where libname ne 'SASHELP'.