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;

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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