BookmarkSubscribeRSS Feed
DejanPeeski
Calcite | Level 5

If macro is not stored (it was not use "/store source" when the macro was created ) in SAS can i see the code of the macro somehow?

3 REPLIES 3
PaigeMiller
Diamond | Level 26

The macro would have to be saved as a .SAS program (which is just a text file), in which case the SAS Program Editor, or the SAS ENhanced Editor, or any text editor, can show you the macro code.

--
Paige Miller
data_null__
Jade | Level 19

You can look in the catalog with INFILE/INPUT.  If the macro is mostly SAS Code you will see lots of stuff that you recognize.  Otherwise you will need to reverse engineer the compiled bits.  Change work.sasmac1 to your catalog and EXT...NAME to the macro name.

filename FT66F001 catalog 'work.sasmac1';
data _null_;
  
infile FT66F001('EXTENDVALIDMEMNAME.macro');
   input;
  
list;
  
run;

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1406 views
  • 0 likes
  • 3 in conversation