Based on this [post](https://stackoverflow.com/questions/37143108/how-to-list-all-available-user-defined-macros-in-sas-enterprise-guide), I can get a list of compiled macros in a program, ordered by their first appearance, using the following code:

```
%macro FirstMacro();
  %put Hello, World!;
%mend;

%macro SecondMacro();
  %put Goodbye, cruel world!;
%mend;

proc sql;
  select objname, created
  from dictionary.catalogs
  where objtype='MACRO' and libname ^= 'SASHELP'
  order by created
  ;
quit;

```

This, however, gives all the macros in uppercase.

```
               Object Name                           Date Created
               --------------------------------------------------
               FIRSTMACRO                        09FEB17:16:12:31
               SECONDMACRO                       09FEB17:16:12:31

```

I use [PascalCase](https://en.wikipedia.org/wiki/PascalCase) for my macro names (as illustrated above). Is there a way to get a similar list, but with case sensitivity preserved?

It seems like [PROC SCAPROC](http://support.sas.com/documentation/cdl/en/proc/69850/HTML/default/viewer.htm#p0sf63lx4fs2m5n14qv1bn8p863v.htm) might provide such a list, but it's unclear to me. There is a [note](http://support.sas.com/kb/48/812.html) from when PROC SCAPROC was first released (in 9.2) that indicates that PROC SCAPROC doesn't provide support for when a %MACRO is used. However, the note says this will be a feature in future versions of SAS. With SAS 9.4 it's unclear whether the feature has been added yet.

The only other alternative I can think of is to write a script in some other language which analyzes the text above for the macro names.